diff -ruN lsb-3.1.orig/debian/changelog lsb-3.1/debian/changelog --- lsb-3.1.orig/debian/changelog 2008-01-24 00:46:49.000000000 +0900 +++ lsb-3.1/debian/changelog 2008-03-13 19:36:06.000000000 +0900 @@ -1,3 +1,10 @@ +lsb (3.1-24ubuntu3) hardy; urgency=low + + * init-functions: Added support function for LSB status compliance + (LP: #203169), coded with Dustin Kirkland + + -- Onno Benschop Thu, 13 Mar 2008 19:30:54 +0900 + lsb (3.1-24ubuntu2) hardy; urgency=low * lsb-cxx: Drop dependency on libstdc++5, not needed by LSB-3.1. diff -ruN lsb-3.1.orig/init-functions lsb-3.1/init-functions --- lsb-3.1.orig/init-functions 2007-10-05 04:15:15.000000000 +0800 +++ lsb-3.1/init-functions 2008-03-13 19:30:42.000000000 +0900 @@ -132,6 +132,21 @@ return 0 } +# Return LSB status +status_of_proc () { + local daemon name status + daemon="$1" + name="$2" + pidofproc $daemon >/dev/null + status=$? + if [ $status -eq 0 ]; then + log_success_msg "$name is running." + else + log_failure_msg "$name is not running." + fi + return $status +} + log_use_fancy_output () { TPUT=/usr/bin/tput EXPR=/usr/bin/expr