diff options
author | Mike Frysinger <vapier@gentoo.org> | 2004-02-14 05:08:42 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2004-02-14 05:08:42 +0000 |
commit | 26cd1bfa8c86effcb9a9cbfd58c8b6332d468b93 (patch) | |
tree | 9a0d78e2f93db6cdae9c5b789f7e4f8c702860a7 /net-misc/ntp | |
parent | DEPEND fix #37730 (diff) | |
download | gentoo-2-26cd1bfa8c86effcb9a9cbfd58c8b6332d468b93.tar.gz gentoo-2-26cd1bfa8c86effcb9a9cbfd58c8b6332d468b93.tar.bz2 gentoo-2-26cd1bfa8c86effcb9a9cbfd58c8b6332d468b93.zip |
make sure pidfile can be created #37342
Diffstat (limited to 'net-misc/ntp')
-rw-r--r-- | net-misc/ntp/files/ntpd.rc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net-misc/ntp/files/ntpd.rc b/net-misc/ntp/files/ntpd.rc index a7381d098358..99a21586716d 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.14 2003/10/30 06:18:48 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntpd.rc,v 1.15 2004/02/14 05:08:42 vapier Exp $ depend() { need net @@ -22,7 +22,9 @@ start() { checkconfig || return $? ebegin "Starting ntpd" - start-stop-daemon --start --quiet --pidfile /var/run/ntpd.pid \ + touch /var/run/ntpd.pid + chown ntp:ntp /var/run/ntpd.pid + start-stop-daemon --start --quiet \ --startas /usr/bin/ntpd -- -p /var/run/ntpd.pid ${NTPD_OPTS} eend $? "Failed to start ntpd" } @@ -31,7 +33,4 @@ stop() { ebegin "Stopping ntpd" start-stop-daemon --stop --quiet --pidfile /var/run/ntpd.pid eend $? "Failed to stop ntpd" - - # clean stale pidfile - [ -f /var/run/ntpd.pid ] && rm -f /var/run/ntpd.pid } |