Package: bacula-director-common
Version: 2.4.4-1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: initd-status-support
Here is a patch to support the "status" action in the init.d scripts. I
haven't had the chance to test this extensively, as this package is quite
complex to learn about on the spot, so please make sure you give this another
round of testing.
diff -u bacula-2.4.4/debian/bacula-sd.init bacula-2.4.4/debian/bacula-sd.init
--- bacula-2.4.4/debian/bacula-sd.init
+++ bacula-2.4.4/debian/bacula-sd.init
@@ -28,6 +28,7 @@
PORT=`getent services bacula-sd | awk '{ gsub("/tcp","",$2); print $2; }'`
fi
+. /lib/lsb/init-functions
. /usr/share/bacula-common/common-functions
create_var_run_dir
@@ -61,9 +62,12 @@
--exec $DAEMON -- $ARGS
echo "$NAME."
;;
+ status)
+ status_of_proc -p $PIDFILE $DAEMON $NAME
+ ;;
*)
N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
exit 1
;;
esac
diff -u bacula-2.4.4/debian/bacula-director-common.bacula-director.init bacula-2.4.4/debian/bacula-director-common.bacula-director.init
--- bacula-2.4.4/debian/bacula-director-common.bacula-director.init
+++ bacula-2.4.4/debian/bacula-director-common.bacula-director.init
@@ -30,6 +30,7 @@
PIDFILE=/var/run/bacula/$NAME.$PORT.pid
+. /lib/lsb/init-functions
. /usr/share/bacula-common/common-functions
create_var_run_dir
@@ -117,10 +118,14 @@
echo "$NAME."
;;
+ status)
+ status_of_proc -p $PIDFILE $DAEMON $NAME
+ ;;
+
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
- echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
exit 1
;;
esac
diff -u bacula-2.4.4/debian/control bacula-2.4.4/debian/control
--- bacula-2.4.4/debian/control
+++ bacula-2.4.4/debian/control
@@ -46,7 +46,7 @@
Package: bacula-director-common
Architecture: any
Pre-Depends: debconf (>= 1.4.30) | debconf-2.0, bacula-common (= ${binary:Version})
-Depends: ${shlibs:Depends}, adduser, mailx
+Depends: ${shlibs:Depends}, adduser, mailx, lsb-base (>= 3.2-13)
Description: network backup, recovery and verification - Director common files
Bacula is a set of programs to manage backup, recovery and verification of
data across a network of computers of different kinds.
@@ -149,7 +149,7 @@
Package: bacula-fd
Architecture: any
-Depends: bacula-common (= ${binary:Version}), ${shlibs:Depends}
+Depends: bacula-common (= ${binary:Version}), ${shlibs:Depends}, lsb-base (>= 3.2-13)
Suggests: bacula-traymonitor
Description: network backup, recovery and verification - file daemon
Bacula is a set of programs to manage backup, recovery and verification of
@@ -173,7 +173,7 @@
Package: bacula-sd
Architecture: any
Pre-Depends: bacula-common (= ${binary:Version})
-Depends: ${shlibs:Depends}, mtx, python
+Depends: ${shlibs:Depends}, mtx, python, lsb-base (>= 3.2-13)
Recommends: mt-st, bacula-sd-tools
Suggests: dds2tar, scsitools, sg3-utils
Description: network backup, recovery and verification - storage daemon
diff -u bacula-2.4.4/debian/bacula-fd.init bacula-2.4.4/debian/bacula-fd.init
--- bacula-2.4.4/debian/bacula-fd.init
+++ bacula-2.4.4/debian/bacula-fd.init
@@ -30,6 +30,7 @@
PORT=`getent services bacula-fd | awk '{ gsub("/tcp","",$2); print $2; }'`
fi
+. /lib/lsb/init-functions
. /usr/share/bacula-common/common-functions
create_var_run_dir
@@ -63,9 +64,12 @@
--exec $DAEMON -- $ARGS
echo "$NAME."
;;
+ status)
+ status_of_proc -p $PIDFILE $DAEMON $NAME
+ ;;
*)
N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
exit 1
;;
esac