forked from ports/contrib
ntp: run without root-privileges, patch by frinnst
This commit is contained in:
parent
f13f2ca00f
commit
b86fef9a52
@ -29,10 +29,10 @@ drwxr-xr-x root/root usr/man/man5/
|
||||
drwxr-xr-x root/root usr/man/man8/
|
||||
drwxr-xr-x root/root var/
|
||||
drwxr-xr-x root/root var/lib/
|
||||
drwxr-xr-x root/root var/lib/ntp/
|
||||
-rw-r--r-- root/root var/lib/ntp/ntp.drift
|
||||
drwxr-xr-x root/root var/lib/ntp/stats/
|
||||
drwxr-xr-x ntp/ntp var/lib/ntp/
|
||||
-rw-r--r-- ntp/ntp var/lib/ntp/ntp.drift
|
||||
drwxr-xr-x ntp/ntp var/lib/ntp/stats/
|
||||
drwxr-xr-x root/root var/log/
|
||||
-rw-r--r-- root/root var/log/ntp.log (EMPTY)
|
||||
-rw-r--r-- ntp/ntp var/log/ntp.log (EMPTY)
|
||||
drwxr-xr-x root/root var/run/
|
||||
drwxr-xr-x root/root var/run/ntp/
|
||||
drwxr-xr-x ntp/ntp var/run/ntp/
|
||||
|
@ -1,5 +1,5 @@
|
||||
00df80a84ec9528fcfb09498075525bc ntp-4.2.6p5.tar.gz
|
||||
0c5675c46a226de4504f5b855326b6b7 ntp-64bit.diff
|
||||
de14b18b5f2be841a9c3434012c19f6c ntp.conf
|
||||
2aaeeae50b860296490b03dc5fbe1736 ntpd
|
||||
eed11bcd8b443bc9b2c96dc5a33cbdc0 ntpd
|
||||
3714dba66445d1b41d6c699447c7a65e ntpdate
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
name=ntp
|
||||
version=4.2.6p5
|
||||
release=1
|
||||
release=2
|
||||
source=(http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/$name-$version.tar.gz
|
||||
ntpd
|
||||
ntpdate
|
||||
@ -53,4 +53,7 @@ build () {
|
||||
|
||||
# initialize ntp.drift file
|
||||
echo "0.0" > $PKG/var/lib/ntp/ntp.drift
|
||||
|
||||
# assign ownership to ntp:ntp
|
||||
chown -R ntp:ntp $PKG/var/lib/ntp $PKG/var/run/ntp $PKG/var/log/ntp.log
|
||||
}
|
||||
|
4
ntp/ntpd
4
ntp/ntpd
@ -5,8 +5,8 @@
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
/usr/bin/ntpd -gqx
|
||||
/usr/bin/ntpd
|
||||
/usr/bin/ntpd -u ntp:ntp -gqx
|
||||
/usr/bin/ntpd -u ntp:ntp
|
||||
;;
|
||||
stop)
|
||||
/sbin/hwclock -w
|
||||
|
5
ntp/pre-install
Normal file
5
ntp/pre-install
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
getent group ntp || /usr/sbin/groupadd -g 77 ntp
|
||||
getent passwd ntp || /usr/sbin/useradd -g ntp -u 77 -d /var/lib/ntp -s /bin/false ntp
|
||||
/usr/bin/passwd -l ntp
|
Loading…
x
Reference in New Issue
Block a user