Package: bip Version: 0.7.4-1 Severity: normal Tags: patch The bip init script could really use a 'status' action, as defined in the LSB specification [1]. Such an action allows a system administrator to poll the service's init script and retrieve the status (running or not) of the daemon.
Recently, a new function, status_of_proc(), was added to /lib/lsb/init-functions that makes this relatively trivial. I've attached a patch that adds this functionality. [1] http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html -- :-Dustin Dustin Kirkland Ubuntu Server Developer Canonical, LTD [EMAIL PROTECTED] GPG: 1024D/83A61194
diff -u bip-0.7.4/debian/control bip-0.7.4/debian/control --- bip-0.7.4/debian/control +++ bip-0.7.4/debian/control @@ -8,7 +8,7 @@ Homepage: http://bip.t1r.net Package: bip Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.0-6) +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.2-14) Description: multiuser irc proxy with conversation replay and more Bip is a IRC proxy that supports replaying logged conversation when a client connects, multiple clients on one irc server connection, It has a handy diff -u bip-0.7.4/debian/bip.init bip-0.7.4/debian/bip.init --- bip-0.7.4/debian/bip.init +++ bip-0.7.4/debian/bip.init @@ -96,8 +96,16 @@ 2) log_end_msg 1 ;; esac ;; +status) + # /var/run/bip/bip.pid is perm'd 600, so only use -p if readable + if [ -r "$PIDFILE" ]; then + status_of_proc -p "$PIDFILE" "$BIP" bip && exit 0 || exit $? + else + status_of_proc "$BIP" bip && exit 0 || exit $? + fi +;; *) - echo "Usage: /etc/init.d/bip {start|stop|reload|restart}" + echo "Usage: /etc/init.d/bip {start|stop|reload|restart|status}" exit 3 ;; esac
signature.asc
Description: This is a digitally signed message part