From 5db44cbbae1952d066de5c50480dd5a46dba92c8 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 13 Dec 2020 11:56:43 -0500 Subject: /etc/init.d/*: Use s-s-d -x not -p --- diff --git a/changelog b/changelog index 6e8832b..6e53fac 100644 --- a/changelog +++ b/changelog @@ -3,6 +3,8 @@ busybox (1.32.0-4) trunk * Normalize log messages in service initialization scripts. * Make klogd and syslogd start earlier and stop later, to catch more kernel messages. + * Make all service initialization scripts match processes by + executable path. Previously, some relied on PID files. -- Patrick McDermott Sun, 13 Dec 2020 11:19:10 -0500 diff --git a/src.etc/init.d/httpd b/src.etc/init.d/httpd index 2ebd361..796ccd3 100755 --- a/src.etc/init.d/httpd +++ b/src.etc/init.d/httpd @@ -6,12 +6,11 @@ STOP='60' start() { log 'Starting HTTP daemon' - start-stop-daemon -S -q -p /var/run/httpd.pid -m \ - -x /usr/sbin/httpd -b -- -f -h /var/www + start-stop-daemon -S -q -x /usr/sbin/httpd -b -- -f -h /var/www } stop() { log 'Stopping HTTP daemon' - start-stop-daemon -K -q -p /var/run/httpd.pid + start-stop-daemon -K -q -x /usr/sbin/httpd } diff --git a/src.etc/init.d/klogd b/src.etc/init.d/klogd index 8a12c85..dae7b82 100755 --- a/src.etc/init.d/klogd +++ b/src.etc/init.d/klogd @@ -12,5 +12,5 @@ start() stop() { log 'Stopping kernel log daemon' - start-stop-daemon -K -q -p /var/run/klogd.pid + start-stop-daemon -K -q -x /sbin/klogd } diff --git a/src.etc/init.d/ntpd b/src.etc/init.d/ntpd index a71995e..b07be4f 100644 --- a/src.etc/init.d/ntpd +++ b/src.etc/init.d/ntpd @@ -16,5 +16,5 @@ start() stop() { log 'Stopping NTP daemon' - start-stop-daemon -K -q -p /var/run/ntpd.pid + start-stop-daemon -K -q -x /usr/sbin/ntpd } diff --git a/src.etc/init.d/syslogd b/src.etc/init.d/syslogd index 37e6b94..36415b6 100755 --- a/src.etc/init.d/syslogd +++ b/src.etc/init.d/syslogd @@ -12,5 +12,5 @@ start() stop() { log 'Stopping system logging daemon' - start-stop-daemon -K -q -p /var/run/syslogd.pid + start-stop-daemon -K -q -x /sbin/syslogd } diff --git a/src.etc/init.d/syslogd-ipc b/src.etc/init.d/syslogd-ipc index 9b88d7e..f91e2d5 100755 --- a/src.etc/init.d/syslogd-ipc +++ b/src.etc/init.d/syslogd-ipc @@ -12,5 +12,5 @@ start() stop() { log 'Stopping system logging daemon' - start-stop-daemon -K -q -p /var/run/syslogd.pid + start-stop-daemon -K -q -x /sbin/syslogd } diff --git a/src.etc/init.d/telnetd b/src.etc/init.d/telnetd index 4bb7613..e9630ea 100755 --- a/src.etc/init.d/telnetd +++ b/src.etc/init.d/telnetd @@ -6,12 +6,11 @@ STOP='60' start() { log 'Starting telnet daemon' - start-stop-daemon -S -q -p /var/run/telnetd.pid -m \ - -x /usr/sbin/telnetd -b -- -F + start-stop-daemon -S -q -x /usr/sbin/telnetd -b -- -F } stop() { log 'Stopping telnet daemon' - start-stop-daemon -K -q -p /var/run/telnetd.pid + start-stop-daemon -K -q -x /usr/sbin/telnetd } -- cgit v0.9.1