Opened 15 years ago

Closed 15 years ago

#2472 closed defect (fixed)

getpids() bug in lfs/init.d/functions, as of lfs-bootscripts-20090523

Reported by: Jeremy Henty Owned by: lfs-book@…
Priority: normal Milestone: 6.5
Component: Book Version: unspecified
Severity: normal Keywords:
Cc:

Description

The definition of getpids() is:

getpids() {

if [ -z "${PIDFILE}" ]; then

pidofproc -s -p "${PIDFILE}" $@

else

pidofproc -s $@

fi base="${1##*/}"

}

This is plainly wrong: the two clauses of the if statement should be swapped. NB: all the other uses of pidofproc() in this file are correct: the then clause of the 'if -z "$..>"' statement calls pidofproc() without the -p flag and the else clause calls it with the -p flag.

Change History (2)

comment:1 by bdubbs@…, 15 years ago

This is an interesting bug. I note that none of the lfs or blfs files use this function. The comment says:

# This will ensure compatibility with previous LFS Bootscripts

The last instance of use was removed in change r8075 in April of 2007. Perhaps we should just remove the function completely.

comment:2 by Matthew Burgess, 15 years ago

Resolution: fixed
Status: newclosed

Fixed in r9040 and r9041.

Note: See TracTickets for help on using tickets.