Bug#567802: kdm: Please use lsb output functions in init.d/kdm

2010-02-27 Thread Petter Reinholdtsen
tags 567802 + patch
thanks

Here is a tested patch implementing this change.  Please include it in
the next kdm upload.

Happy hacking,
-- 
Petter Reinholdtsen
--- /etc/init.d/kdm.orig2010-02-27 09:37:03.0 +0100
+++ /etc/init.d/kdm 2010-02-27 09:59:35.0 +0100
@@ -119,11 +119,14 @@
 if [ -e $DEFAULT_DISPLAY_MANAGER_FILE ] &&
[ "$HEED_DEFAULT_DISPLAY_MANAGER" = "true" ] &&
[ "$(cat $DEFAULT_DISPLAY_MANAGER_FILE)" != "$DAEMON" ]; then
-  echo "Not starting K Display Manager (kdm); it is not the default 
display manager."
+  log_action_msg "Not starting K Display Manager (kdm); it is not the 
default display manager."
 else
-  echo -n "Starting K Display Manager: kdm"
-  start-stop-daemon --start --quiet $SSD_ARGS -- $ARG || echo -n " already 
running"
-  echo "."
+  log_daemon_msg "Starting K Display Manager" "kdm"
+  if start-stop-daemon --start --quiet $SSD_ARGS -- $ARG ; then
+log_end_msg 0
+  else
+log_action_end_msg 1 "already running"
+  fi
 fi
   ;;
 
@@ -138,11 +141,11 @@
   ;;
 
   reload)
-echo -n "Reloading K Display Manager configuration..."
+log_action_begin_msg "Reloading K Display Manager configuration..."
 if start-stop-daemon --stop --signal 1 --quiet $SSD_ARGS; then
-  echo "done."
+  log_action_end_msg 0
 else
-  echo "kdm not running."
+  log_action_end_msg 1 "kdm not running"
 fi
   ;;
 
@@ -151,9 +154,9 @@
   ;;
 
   stop)
-echo -n "Stopping K Display Manager: kdm"
+log_action_begin_msg "Stopping K Display Manager: kdm"
 if [ ! -f $PIDFILE ]; then
-  echo " not running ($PIDFILE not found)."
+  log_action_end_msg 0 " not running ($PIDFILE not found)"
   exit 0
 else
   DAEMONPID=$(cat $PIDFILE | tr -d '[:blank:]')
@@ -163,7 +166,7 @@
   # give kdm's signal handler a second to catch its breath
   sleep 1
 else
-  echo -n " not running"
+  log_action_cont_msg " not running"
 fi
   fi
   while [ $KILLCOUNT -le 5 ]; do
@@ -176,12 +179,12 @@
 KILLCOUNT=$(( $KILLCOUNT + 1 ))
   done
   if stillrunning; then
-echo -n " not responding to TERM signal (pid $DAEMONPID)"
+log_action_cont_msg " not responding to TERM signal (pid $DAEMONPID)"
   else
 rm -f $UPGRADEFILE
   fi
 fi
-echo "."
+log_action_end_msg 0
   ;;
   status)
 status_of_proc -p "$PIDFILE" "$DAEMON" kdm && exit 0 || exit $?


Processed: Re: Bug#567802: kdm: Please use lsb output functions in init.d/kdm

2010-02-27 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> tags 567802 + patch
Bug #567802 [kdm] kdm: Please use lsb output functions in init.d/kdm
Added tag(s) patch.
> thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to debian-qt-kde-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/handler.s.c.12672614307847.transcr...@bugs.debian.org



Bug#567802: kdm: Please use lsb output functions in init.d/kdm

2010-01-31 Thread Petter Reinholdtsen

Package:  kdm
Version:  4:4.3.4-4
User: debian-...@lists.debian.org
UserTags: debian-edu

When using kdm with the progress bar and console in usplash, no
message show up when kdm is started.

The reason is that the init.d script do not use the output functions
in /lib/lsb/init-functions, but uses echo directly.  usplash override
the functions in /lib/lsb/init-functions to feed the text into the
graphical boot screen, and thus depend on the use of the lsb output
functions.

Please change the init.d script to use the lsb output functions.

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to debian-qt-kde-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org