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 <daniel.weismueller@ipfire.org>
This commit is contained in:
Michael Tremer
2024-01-11 15:57:50 +01:00
committed by Daniel Weismüller
parent 7270984c46
commit dd8ef8cc10

View 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 $@