Package: uml-utilities Version: 20060323-3 Severity: minor Tags: patch
Hi, the attached patch changes the uml-utilities init.d script(s) to use lsb logging functions. Regards, David -- David Härdeman
diff -ur ./uml-utilities-20060323.orig/debian/control ./uml-utilities-20060323/debian/control --- ./uml-utilities-20060323.orig/debian/control 2006-09-03 22:53:23.000000000 +0200 +++ ./uml-utilities-20060323/debian/control 2006-09-03 22:57:32.000000000 +0200 @@ -8,7 +8,7 @@ Package: uml-utilities Architecture: any -Depends: adduser, makedev (>= 2.3.1-62), ${shlibs:Depends} +Depends: adduser, makedev (>= 2.3.1-62), ${shlibs:Depends}, lsb-base (>= 3.0-10) Suggests: user-mode-linux Description: User-mode Linux (utility programs) User-mode Linux is a port of the Linux kernel to its own system call diff -ur ./uml-utilities-20060323.orig/debian/uml-utilities.init ./uml-utilities-20060323/debian/uml-utilities.init --- ./uml-utilities-20060323.orig/debian/uml-utilities.init 2006-09-03 22:53:23.000000000 +0200 +++ ./uml-utilities-20060323/debian/uml-utilities.init 2006-09-03 22:57:11.000000000 +0200 @@ -12,6 +12,7 @@ PIDFILE=/var/run/uml-utilities/$NAME.pid test -x $DAEMON || exit 0 +. /lib/lsb/init-functions set -e @@ -27,13 +28,12 @@ case "$1" in start) - echo -n "Starting $DESC: " if [ "x$UML_SWITCH_START" = "xfalse" ] ; then - echo " Disabled." + [ "$VERBOSE" = "yes" ] && log_warning_msg "$DESC disabled" exit 0 - else - echo -n " $NAME" fi + + log_daemon_msg "Starting $DESC" "$NAME" start-stop-daemon --start --quiet --pidfile $PIDFILE \ --make-pidfile --background --chuid $UML_SWITCH_USER \ --exec $DAEMON -- $OPTIONS @@ -43,20 +43,21 @@ sleep 1 WAIT=$(($WAIT - 1)) if [ $WAIT -le 0 ]; then - echo "$DAEMON never created control socket $UML_SWITCH_CTL" >&2 + log_end_msg 1 + log_warning_msg "$DAEMON never created control socket $UML_SWITCH_CTL" exit 1 fi done chmod 777 $UML_SWITCH_CTL - echo "." + log_end_msg 0 ;; stop) - echo -n "Stopping $DESC: $NAME" + log_daemon_msg "Stopping $DESC" "$NAME" start-stop-daemon --stop --quiet --pidfile $PIDFILE \ --oknodo --exec $DAEMON rm -f $PIDFILE $UML_SWITCH_CTL $UML_SWITCH_DATA - echo "." + log_end_msg 0 ;; restart|force-reload) $0 stop