Bug#592583: Initscript should contain --oknodo for start-stop-daemon
Package: vsftpd Version: 2.0.7-1 Severity: minor We had a problem using heartbeat with /etc/init.d/vsftpd. When vsftpd is already running and the initscript is invoked a second time with start error code 1 is returned. According to the Debian Policy[1] error code 0 is expected. Find attached a patch which solved our problem. [1] http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit The init.d scripts must ensure that they will behave sensibly (i.e., returning success and not starting multiple copies of a service) if invoked with start when the service is already running, or with stop when it isn't, and that they don't kill unfortunately-named user processes. The best way achieve this is usually to use start-stop-daemon with the --oknodo option. --- vsftpd.orig 2009-01-31 01:07:35.0 +0100 +++ vsftpd 2010-08-11 10:15:56.0 +0200 @@ -30,7 +30,7 @@ start) echo -n Starting FTP server: $NAME [ -d /var/run/vsftpd ] || mkdir -p /var/run/vsftpd -start-stop-daemon --start --background -m --pidfile /var/run/vsftpd/vsftpd.pid --exec $DAEMON +start-stop-daemon --start --background -m --pidfile /var/run/vsftpd/vsftpd.pid --oknodo --exec $DAEMON echo . ;; stop)
Bug#592582: Initscript should contain --oknodo for start-stop-daemon
Package: openbsd-inetd Version: 0.20080125-2 Severity: minor We had a problem using heartbeat with /etc/init.d/openbsd-inetd. When openbsd-inetd is already running and the initscript is invoked a second time with start error code 1 is returned. According to the Debian Policy[1] error code 0 is expected. Find attached a patch which solved our problem. [1] http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit The init.d scripts must ensure that they will behave sensibly (i.e., returning success and not starting multiple copies of a service) if invoked with start when the service is already running, or with stop when it isn't, and that they don't kill unfortunately-named user processes. The best way achieve this is usually to use start-stop-daemon with the --oknodo option. Discussion: 'Clarify what sensible behaviour is for init scripts' BTS#426877--- openbsd-inetd.orig 2008-12-15 02:23:18.0 +0100 +++ openbsd-inetd 2010-08-11 10:16:04.0 +0200 @@ -47,6 +47,7 @@ checkportmap log_daemon_msg Starting internet superserver inetd start-stop-daemon --start --quiet --pidfile /var/run/inetd.pid \ +--oknodo \ --exec $DAEMON -- $OPTIONS log_end_msg 0 ;;
Bug#535049: (no subject)
I can confirm this problem and merged my bugreport #571608 to this bugreport. The problem is a wrong order of init script execution. Please see my bugreport for a Proof-of-concept if-up.d-script which could fix this issue. An other way could be to fix ntpd/ntp_intres.c (upstream) so it would try endless to resolve the time servers. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#571608: NTP does not work with networkmanager (host name not found)
Subject: ntp: NTP does not work with networkmanager (host name not found) Package: ntp Version: 1:4.2.4p4+dfsg-8lenny3 Severity: normal *** Please type your report below this line *** When booting using ntp and networkmanger, ntp starts and tries to resolve the timeservers even when the network connection is not established yet. This causes ntp to startup but not poll my timeservers. Mar 24 17:34:23 host ntpd_initres[3003]: host name not found: time1.example.net Mar 24 17:34:23 host ntpd_initres[3003]: couldn't resolve `time1.example.net', giving up on it Mar 24 17:34:23 host ntpd_initres[3003]: host name not found: time2.example.net Mar 24 17:34:23 host ntpd_initres[3003]: couldn't resolve `time2.example.net', giving up on it Mar 24 17:34:32 host dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5 Mar 24 17:34:32 host dhclient: DHCPOFFER from 1.2.3.4 Mar 24 17:34:32 host dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67 Mar 24 17:34:32 host dhclient: DHCPACK from 1.2.3.4 Without networkmanager everything runs fine as the script networking is executed before ntp As networkmanager obeys /etc/network/if-up.d/ I placed this file as workaround and it works now for me. #!/bin/bash if [ $IFACE = lo ]; then exit 0 fi main() { sleep 10 /etc/init.d/ntp restart } main -- System Information: Debian Release: 5.0.4 APT prefers stable APT policy: (990, 'stable') Architecture: i386 (i686) Kernel: Linux 2.6.26-2-686 (SMP w/1 CPU core) Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages ntp depends on: ii adduser 3.110add and remove users and groups ii libc6 2.7-18lenny2 GNU C Library: Shared libraries ii libcap1 1:1.10-14support for getting/setting POSIX. ii libedit22.11~20080614-1 BSD editline and history libraries ii libncurses5 5.7+20081213-1 shared libraries for terminal hand ii libssl0.9.8 0.9.8g-15+lenny6 SSL shared libraries ii lsb-base3.2-20 Linux Standard Base 3.2 init scrip ii netbase 4.34 Basic TCP/IP networking system Versions of packages ntp recommends: ii perl 5.10.0-19lenny2 Larry Wall's Practical Extraction Versions of packages ntp suggests: pn ntp-doc none (no description available) -- no debconf information -- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org