diff options
author | Mike Frysinger <vapier@gentoo.org> | 2004-04-05 23:20:19 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2004-04-05 23:20:19 +0000 |
commit | 4142eea9fb0b1acb4be19fdc8fbe861f32ec325f (patch) | |
tree | 0cff820cfedb4bfc090e0c5c3d81ecb9d985ff08 | |
parent | amd64 stable (diff) | |
download | gentoo-2-4142eea9fb0b1acb4be19fdc8fbe861f32ec325f.tar.gz gentoo-2-4142eea9fb0b1acb4be19fdc8fbe861f32ec325f.tar.bz2 gentoo-2-4142eea9fb0b1acb4be19fdc8fbe861f32ec325f.zip |
make init.d script a little more resilient #45229
-rw-r--r-- | net-misc/ntp/files/ntpd-4.1.2.rc | 8 | ||||
-rw-r--r-- | net-misc/ntp/files/ntpd.rc | 8 |
2 files changed, 7 insertions, 9 deletions
diff --git a/net-misc/ntp/files/ntpd-4.1.2.rc b/net-misc/ntp/files/ntpd-4.1.2.rc index b1f7376d8503..2d0c7668b91d 100644 --- a/net-misc/ntp/files/ntpd-4.1.2.rc +++ b/net-misc/ntp/files/ntpd-4.1.2.rc @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntpd-4.1.2.rc,v 1.1 2004/02/14 22:58:02 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntpd-4.1.2.rc,v 1.2 2004/04/05 23:20:19 vapier Exp $ depend() { need net @@ -24,13 +24,13 @@ start() { ebegin "Starting ntpd" touch /var/run/ntpd.pid chown ntp:ntp /var/run/ntpd.pid - start-stop-daemon --start --quiet --pidfile /var/run/ntpd.pid \ - --startas /usr/bin/ntpd -- -p /var/run/ntpd.pid ${NTPD_OPTS} + /usr/bin/ntpd -p /var/run/ntpd.pid ${NTPD_OPTS} eend $? "Failed to start ntpd" } stop() { ebegin "Stopping ntpd" - start-stop-daemon --stop --quiet --pidfile /var/run/ntpd.pid + start-stop-daemon --stop --pidfile /var/run/ntpd.pid eend $? "Failed to stop ntpd" + rm -f /var/run/ntpd.pid } diff --git a/net-misc/ntp/files/ntpd.rc b/net-misc/ntp/files/ntpd.rc index a21dbf0f738c..1b72fcd4064e 100644 --- a/net-misc/ntp/files/ntpd.rc +++ b/net-misc/ntp/files/ntpd.rc @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntpd.rc,v 1.17 2004/02/14 22:58:02 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntpd.rc,v 1.18 2004/04/05 23:20:19 vapier Exp $ depend() { need net @@ -30,9 +30,7 @@ start() { stop() { ebegin "Stopping ntpd" - if [ -e /var/run/ntpd.pid ] ; then - kill `cat /var/run/ntpd.pid` - rm -f /var/run/ntpd.pid - fi + start-stop-daemon --stop --pidfile /var/run/ntpd.pid eend $? "Failed to stop ntpd" + rm -f /var/run/ntpd.pid } |