Package: backuppc
Version: 3.0.0-4
Severity: wishlist
Tags: patch
Hi,
The following patch is used in Ubuntu to do two things. The first
is to allow /var/run to be a tmpfs by making /var/run/backuppc in
the init script. The second is to use LSB logging.
Apologies to wrap two things up together.
Please consider applying it.
Thanks,
James
--- 3.0.0-4/debian/backuppc.init 2007-10-24 17:08:43.000000000 +0100
+++ 3.0.0-4ubuntu1/debian/backuppc.init 2007-10-24 17:08:32.000000000 +0100
@@ -27,6 +27,13 @@ NAME=backuppc
DAEMON=BackupPC
test -x $BINDIR/$DAEMON || exit 0
+. /lib/lsb/init-functions
+. /etc/default/rcS
+
+if [ ! -d /var/run/backuppc ]; then
+ mkdir /var/run/backuppc
+ chown backuppc:backuppc /var/run/backuppc
+fi
# Check for incompatible old config files
check_old_config()
@@ -46,34 +53,35 @@ check_old_config()
case "$1" in
start)
- echo -n "Starting $NAME: "
+ log_begin_msg "Starting $NAME..."
check_old_config
start-stop-daemon --start --pidfile /var/run/backuppc/BackupPC.pid \
-c $USER --exec $BINDIR/$DAEMON -- -d
- echo "ok."
+ log_end_msg $?
;;
stop)
- echo -n "Stopping $NAME: "
+ log_begin_msg "Stopping $NAME..."
start-stop-daemon --stop --pidfile /var/run/backuppc/BackupPC.pid -u $USER
\
--oknodo --retry 30
- echo "ok."
+ log_end_msg $?
;;
restart)
- echo -n "Restarting $NAME: "
+ log_begin_msg "Restarting $NAME..."
start-stop-daemon --stop --pidfile /var/run/backuppc/BackupPC.pid -u $USER
\
--oknodo --retry 30
check_old_config
start-stop-daemon --start --pidfile /var/run/backuppc/BackupPC.pid \
-c $USER --exec $BINDIR/$DAEMON -- -d
- echo "ok."
+ log_end_msg $?
;;
reload|force-reload)
- echo "Reloading $NAME configuration files"
+ echo "Reloading $NAME configuration files..."
start-stop-daemon --stop --pidfile /var/run/backuppc/BackupPC.pid \
--signal 1
+ log_end_msg $?
;;
*)
- echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload}"
+ log_success_msg "Usage: /etc/init.d/$NAME {start|stop|restart|reload}"
exit 1
;;
esac
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]