Package: dbus
Version: 1.2.1-2
Severity: normal
Tags: patch
The dbus 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
diff -u dbus-1.2.1/debian/dbus.init dbus-1.2.1/debian/dbus.init
--- dbus-1.2.1/debian/dbus.init
+++ dbus-1.2.1/debian/dbus.init
@@ -163,6 +163,9 @@
stop)
shut_it_down
;;
+ status)
+ status_of_proc -p ${PIDFILE} ${DAEMON} ${NAME} && exit 0 || exit $?
+ ;;
reload|force-reload)
reload_it
;;
@@ -171,7 +174,7 @@
start_it_up
;;
*)
- echo "Usage: /etc/init.d/$NAME {start|stop|reload|restart|force-reload}"
>&2
+ echo "Usage: /etc/init.d/$NAME
{start|stop|status|reload|restart|force-reload}" >&2
exit 2
;;
esac
diff -u dbus-1.2.1/debian/control dbus-1.2.1/debian/control
--- dbus-1.2.1/debian/control
+++ dbus-1.2.1/debian/control
@@ -27,7 +27,7 @@
${misc:Depends},
adduser,
debianutils (>= 1.22.0),
- lsb-base (>= 3.1)
+ lsb-base (>= 3.2-14)
Conflicts: libdbus0,
dbus-1,
dbus-1-utils (<< 1.0.2-5),