From 3dd3944097ebf333d7b8c41a0c9eb46d98cdc6d2 Mon Sep 17 00:00:00 2001 From: Fiona Klute Date: Tue, 30 Dec 2025 18:57:36 +0100 Subject: [PATCH] package/dbus: remove broken "condrestart" action & comment from init script The "servicename" environment variable was never set, so the condition in the "condrestart" case would always evaluate to false. Nobody seems to have noticed since it was introduced with commit ceb285976563f6ba2c87a17ff92f1b1490df698a in 2007, so simply remove it. Likewise, the comment in the stop function that mentions $servicename is incorrect, there is no safety check to the "killall" call. With those, remove the /var/lock/subsys/dbus-daemon file that was created but never used. Signed-off-by: Fiona Klute Signed-off-by: Thomas Petazzoni --- .checkpackageignore | 2 +- package/dbus/S30dbus | 15 +-------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/.checkpackageignore b/.checkpackageignore index c36e9401ba..9dddc1788e 100644 --- a/.checkpackageignore +++ b/.checkpackageignore @@ -301,7 +301,7 @@ package/davfs2/0001-src-Makefile.am-do-not-hardcode-fstack-protector-str.patch l package/dbus-cpp/0001-gcc4.7.patch lib_patch.Upstream package/dbus-cpp/0002-cross-compile-tools.patch lib_patch.Upstream package/dbus-cpp/0003-src-pipe.c-fix-build-error-with-gcc-7.x.patch lib_patch.Upstream -package/dbus/S30dbus Shellcheck lib_sysv.Indent lib_sysv.TrailingSpace lib_sysv.Variables +package/dbus/S30dbus Shellcheck lib_sysv.Indent lib_sysv.Variables package/dc3dd/0001-no_man.patch lib_patch.Upstream package/dc3dd/0002-fix-autoreconf.patch lib_patch.Upstream package/dc3dd/0003-fix-for-glibc-2.28.patch lib_patch.Upstream diff --git a/package/dbus/S30dbus b/package/dbus/S30dbus index 26772755d7..da02609f2d 100644 --- a/package/dbus/S30dbus +++ b/package/dbus/S30dbus @@ -12,7 +12,6 @@ # Create needed directories. [ -d /run/dbus ] || mkdir -p /run/dbus -[ -d /var/lock/subsys ] || mkdir -p /var/lock/subsys [ -d /tmp/dbus ] || mkdir -p /tmp/dbus RETVAL=0 @@ -24,20 +23,14 @@ start() { dbus-daemon --system RETVAL=$? echo "done" - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dbus-daemon } stop() { printf "Stopping system message bus: " - - ## we don't want to kill all the per-user $processname, we want - ## to use the pid file *only*; because we use the fake nonexistent - ## program name "$servicename" that should be safe-ish killall dbus-daemon RETVAL=$? echo "done" if [ $RETVAL -eq 0 ]; then - rm -f /var/lock/subsys/dbus-daemon rm -f /run/messagebus.pid fi } @@ -54,18 +47,12 @@ case "$1" in stop start ;; - condrestart) - if [ -f /var/lock/subsys/$servicename ]; then - stop - start - fi - ;; reload) echo "Message bus can't reload its configuration, you have to restart it" RETVAL=$? ;; *) - echo "Usage: $0 {start|stop|restart|condrestart|reload}" + echo "Usage: $0 {start|stop|restart|reload}" ;; esac exit $RETVAL