]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
initscripts: Fix wrong variable check for $PIDFILE in getpids
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 11 Jan 2024 14:57:50 +0000 (15:57 +0100)
committerDaniel Weismüller <daniel.weismueller@ipfire.org>
Thu, 11 Jan 2024 14:57:50 +0000 (15:57 +0100)
getpids() checked whether it needed to pass a pid file to pidofproc, but
the check was inverted.

Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
src/initscripts/system/functions

index 6f53a941badaac4c656e7240f9088023f9a261a9..e4cb304563f443589cb79b72998c151c894355dc 100644 (file)
@@ -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 $@