Package: ntp-server Version: 1:4.2.0a+stable-8 i'd prefer to not have local modifications to /etc/init.d/ntp-server ... i add "-L -i /var/chroot/ntpd" on my boxes. the patch below adds support for /etc/default/ntp-server which allows the OPTIONS and RUNASUSER to be modified.
i also made the "restart" target invoke ntpd the exact same way that the "start" target does. oh and sorry i cleaned up some whitespace issues which makes the patch look a bit larger than it could. thanks -dean diff -ru ntp-4.2.0a+stable/debian/ntp-server.dirs ntp-4.2.0a+stable.dg2/debian/ntp-server.dirs --- ntp-4.2.0a+stable/debian/ntp-server.dirs 2005-06-29 16:58:29.000000000 -0700 +++ ntp-4.2.0a+stable.dg2/debian/ntp-server.dirs 2005-06-29 16:55:15.000000000 -0700 @@ -1,4 +1,5 @@ etc/init.d +etc/default etc/logcheck/ignore.d.server usr/sbin usr/share/man/man1 diff -ru ntp-4.2.0a+stable/debian/ntp-server.init.d ntp-4.2.0a+stable.dg2/debian/ntp-server.init.d --- ntp-4.2.0a+stable/debian/ntp-server.init.d 2005-06-29 16:58:29.000000000 -0700 +++ ntp-4.2.0a+stable.dg2/debian/ntp-server.init.d 2005-06-29 16:59:48.000000000 -0700 @@ -5,6 +5,11 @@ test -f /usr/sbin/ntpd || exit 0 RUNASUSER=ntp +OPTIONS='' +if test -f /etc/default/ntp-server ; then + . /etc/default/ntp-server +fi + UGID=$(getent passwd $RUNASUSER | cut -f 3,4 -d:) || true if [ -z "$UGID" ]; then @@ -15,29 +20,29 @@ case "$1" in start) echo -n "Starting NTP server: ntpd" - start-stop-daemon --start --quiet --pidfile /var/run/ntpd.pid --exec /usr/sbin/ntpd -- -p /var/run/ntpd.pid -u $UGID + start-stop-daemon --start --quiet --pidfile /var/run/ntpd.pid --exec /usr/sbin/ntpd -- -p /var/run/ntpd.pid $OPTIONS -u $UGID echo "." - ;; + ;; stop) echo -n "Stopping NTP server: ntpd" - start-stop-daemon --stop --quiet --pidfile /var/run/ntpd.pid + start-stop-daemon --stop --quiet --pidfile /var/run/ntpd.pid echo "." rm -f /var/run/ntpd.pid - ;; + ;; restart|force-reload) echo -n "Restarting NTP server: ntpd... " - start-stop-daemon --stop --quiet --pidfile /var/run/ntpd.pid - sleep 2 - start-stop-daemon --start --quiet --exec /usr/sbin/ntpd -- -p /var/run/ntpd.pid -u $UGID + start-stop-daemon --stop --quiet --pidfile /var/run/ntpd.pid + sleep 2 + start-stop-daemon --start --quiet --pidfile /var/run/ntpd.pid --exec /usr/sbin/ntpd -- -p /var/run/ntpd.pid $OPTIONS -u $UGID echo "done." - ;; + ;; reload) echo "Not supported, sorry. Use 'restart' or 'force-reload'." >&2 exit 1 ;; *) - echo "Usage: /etc/init.d/ntp-server {start|stop|restart|force-reload}" - exit 1 + echo "Usage: /etc/init.d/ntp-server {start|stop|restart|force-reload}" + exit 1 ;; esac diff -ru ntp-4.2.0a+stable/debian/rules ntp-4.2.0a+stable.dg2/debian/rules --- ntp-4.2.0a+stable/debian/rules 2005-06-29 16:58:29.000000000 -0700 +++ ntp-4.2.0a+stable.dg2/debian/rules 2005-06-29 16:47:26.000000000 -0700 @@ -121,6 +121,8 @@ debian/ntp-server/etc install -o root -g root -m 0644 debian/useless.5 \ debian/ntp-server/usr/share/man/man5/ntp.conf.5 + install -o root -g root -m 0644 debian/ntp-server.default \ + debian/ntp-server/etc/default/ntp-server install -o root -g root -m 0644 debian/ntpdate.default \ debian/ntpdate/etc/default/ntpdate install -o root -g root -m 0644 debian/ntp-server.ignore \ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]