diff -Nru lsb-3.2/debian/changelog lsb-3.2/debian/changelog --- lsb-3.2/debian/changelog 2008-07-08 16:42:29.000000000 -0500 +++ lsb-3.2/debian/changelog 2008-07-09 14:04:32.000000000 -0500 @@ -1,3 +1,13 @@ +lsb (3.2-12ubuntu3) intrepid; urgency=low + + * init-functions: + - In pidofproc(), if the kill -0 fails, use ps to detect if + the proc is running. + - Revert status_of_proc() functionality *back* to using pidofproc() + now that it can run as non-root (LP: #246735). + + -- Dustin Kirkland Wed, 09 Jul 2008 14:03:34 -0500 + lsb (3.2-12ubuntu2) intrepid; urgency=low * init-functions: Replace pidofproc() call in status_of_proc() with a diff -Nru lsb-3.2/init-functions lsb-3.2/init-functions --- lsb-3.2/init-functions 2008-07-08 16:42:29.000000000 -0500 +++ lsb-3.2/init-functions 2008-07-09 14:04:45.000000000 -0500 @@ -81,6 +81,9 @@ if $(kill -0 "${pid:-}" 2> /dev/null); then echo "$pid" return 0 + elif ps "${pid:-}" 2>&1 >/dev/null; then + echo "$pid" + return 0 # program is running, but not owned by this user else return 1 # program is dead and /var/run pid file exists fi @@ -152,18 +155,14 @@ daemon="$1" name="$2" status="0" - if [ -x /bin/pidof ]; then - /bin/pidof -o %PPID "$daemon" >/dev/null || status="$?" - if [ "$status" = 0 ]; then - log_success_msg "$name is running." - else - log_failure_msg "$name is not running." - fi + pidofproc $daemon >/dev/null || status="$?" + if [ "$status" = 0 ]; then + log_success_msg "$name is running." + return 0 else - log_failure_msg "/bin/pidof not available." - status="1" + log_failure_msg "$name is not running." + return $status fi - return $status } log_use_fancy_output () {