From: Michael Tremer Date: Thu, 11 Jan 2024 14:57:50 +0000 (+0100) Subject: initscripts: Fix wrong variable check for $PIDFILE in getpids X-Git-Tag: v2.29-core185~129^2~1 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=dd8ef8cc107a867d4b2a739913b399f6966b34ff initscripts: Fix wrong variable check for $PIDFILE in getpids getpids() checked whether it needed to pass a pid file to pidofproc, but the check was inverted. Signed-off-by: Daniel Weismüller --- diff --git a/src/initscripts/system/functions b/src/initscripts/system/functions index 6f53a941ba..e4cb304563 100644 --- a/src/initscripts/system/functions +++ b/src/initscripts/system/functions @@ -407,7 +407,7 @@ pidofproc() # This will ensure compatibility with previous LFS Bootscripts getpids() { - if [ -z "${PIDFILE}" ]; then + if [ -n "${PIDFILE}" ]; then pidofproc -s -p "${PIDFILE}" $@ else pidofproc -s $@