From dd8ef8cc107a867d4b2a739913b399f6966b34ff Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 11 Jan 2024 15:57:50 +0100 Subject: [PATCH] initscripts: Fix wrong variable check for $PIDFILE in getpids MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit getpids() checked whether it needed to pass a pid file to pidofproc, but the check was inverted. Signed-off-by: Daniel Weismüller --- src/initscripts/system/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 $@ -- 2.39.2