From: <abe...@us...> - 2016-11-29 17:42:00
|
Revision: 8001 http://sourceforge.net/p/astlinux/code/8001 Author: abelbeck Date: 2016-11-29 17:41:57 +0000 (Tue, 29 Nov 2016) Log Message: ----------- ntp, ntpd: workaround restart lockup, can't start ntpd with 'ntp' privileges Modified Paths: -------------- branches/1.0/package/ntp/ntpd.init Modified: branches/1.0/package/ntp/ntpd.init =================================================================== --- branches/1.0/package/ntp/ntpd.init 2016-11-29 15:31:12 UTC (rev 8000) +++ branches/1.0/package/ntp/ntpd.init 2016-11-29 17:41:57 UTC (rev 8001) @@ -6,8 +6,6 @@ DATA_DIR="/var/lib/ntp" -NTPD_STARTED="$DATA_DIR/ntpd_started" - init () { # So sntp doesn't complain @@ -60,7 +58,7 @@ } start () { - local NTPAF="" UG first driftfile + local NTPAF="" UG="" first if [ -f /etc/ntpd.conf ]; then @@ -79,20 +77,10 @@ fi sleep 1 - # workaround restart lockup, start ntpd with 'ntp' privileges at boot, then restart as 'root' - if [ -f $NTPD_STARTED ]; then - UG="" - else - UG="ntp:ntp" - driftfile="$(awk '/^driftfile / { print $2; nextfile; }' /etc/ntpd.conf)" - if [ -n "$driftfile" ] && [ -f "$driftfile" ]; then - chown $UG "$driftfile" - fi - fi + ## workaround restart lockup, can't start ntpd with 'ntp' privileges + ## UG="ntp:ntp" # Maintain the clock (small changes) ntpd $NTPAF -p $PIDFILE${UG:+ -u $UG} -g -c /etc/ntpd.conf - - touch $NTPD_STARTED elif ( set -o noclobber; echo "$$" > /var/lock/ntpd-delayed.lock ) 2>/dev/null; then echo "ntpd: server unreachable, will automatically retry in 2 minutes" ( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |