From 70d1e4044e5f2b661500a7248a7368390b65effe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 14 May 2017 04:28:15 +0200 Subject: DEB tdebase: Rename the tdm-trinity init script to tdm to match with the systemd service name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- debian/lenny/tdebase/debian/rules | 2 + debian/lenny/tdebase/debian/tdm-trinity.init | 202 --------------------- .../lenny/tdebase/debian/tdm-trinity.maintscript | 1 + debian/lenny/tdebase/debian/tdm-trinity.postinst | 28 +-- debian/lenny/tdebase/debian/tdm-trinity.postrm | 9 + debian/lenny/tdebase/debian/tdm-trinity.preinst | 6 + debian/lenny/tdebase/debian/tdm-trinity.prerm | 16 +- debian/lenny/tdebase/debian/tdm-trinity.templates | 4 +- debian/lenny/tdebase/debian/tdm.init | 202 +++++++++++++++++++++ 9 files changed, 251 insertions(+), 219 deletions(-) delete mode 100644 debian/lenny/tdebase/debian/tdm-trinity.init create mode 100644 debian/lenny/tdebase/debian/tdm-trinity.maintscript create mode 100644 debian/lenny/tdebase/debian/tdm.init (limited to 'debian/lenny') diff --git a/debian/lenny/tdebase/debian/rules b/debian/lenny/tdebase/debian/rules index af06011ab..0a18214c5 100755 --- a/debian/lenny/tdebase/debian/rules +++ b/debian/lenny/tdebase/debian/rules @@ -123,6 +123,8 @@ install/tdm-trinity:: binary-install/tdm-trinity:: mkdir -p debian/tdm-trinity/etc/init + mkdir -p debian/tdm-trinity/etc/init.d + install -p -D -m755 debian/tdm.init debian/tdm-trinity/etc/init.d/tdm install -p -D -m644 debian/tdm-trinity.pam debian/tdm-trinity/etc/pam.d/tdm-trinity install -p -D -m644 debian/tdm-trinity-np.pam debian/tdm-trinity/etc/pam.d/tdm-trinity-np diff --git a/debian/lenny/tdebase/debian/tdm-trinity.init b/debian/lenny/tdebase/debian/tdm-trinity.init deleted file mode 100644 index e5286ff8d..000000000 --- a/debian/lenny/tdebase/debian/tdm-trinity.init +++ /dev/null @@ -1,202 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: x-display-manager tdm-trinity -# Required-Start: $local_fs $remote_fs -# Required-Stop: $local_fs $remote_fs -# Should-Start: console-screen kbd acpid hal krb5-kdc nis -# Should-Stop: console-screen kbd -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: X display manager for Trinity -# Description: TDM manages a collection of X servers, which may be on the local host or remote machines. -### END INIT INFO -# /etc/init.d/tdm-trinity: start or stop the X display manager -# Script originally stolen from the xdm package -# -# description: Trinity Display Manager -# - -. /lib/lsb/init-functions - -set -e - -# To start tdm-trinity even if it is not the default display manager, change -# HEED_DEFAULT_DISPLAY_MANAGER to "false." -HEED_DEFAULT_DISPLAY_MANAGER=true -DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager - -TDEDIRS=/opt/trinity/ -PATH=/opt/trinity/bin:/bin:/usr/bin:/sbin:/usr/sbin -DAEMON=/opt/trinity/bin/tdm -PIDFILE=/var/run/tdm.pid -UPGRADEFILE=/var/run/tdm.upgrade - -# parameters to support tdm customization -TDMRC=/etc/trinity/tdm/tdmrc -BACKGROUNDRC=/etc/trinity/tdm/backgroundrc - -#if configuration is changed by tdmtheme or other tools, don't do magick -if grep -q "Theme=@@@ToBeReplacedByDesktopBase@@@" ${TDMRC} && grep -q "Wallpaper=default_blue.jpg" ${BACKGROUNDRC} -then - - - -TDMOVERRIDEDIR=/etc/default/tdm-trinity.d -TDMCFGDIR=/var/run/tdm-trinity -TDMCFG=$TDMCFGDIR/tdmrc -BACKGROUNDCFG=$TDMCFGDIR/backgroundrc - -test -x $DAEMON || exit 0 - -# uncomment, if you want auto-logon to be runlevel-dependant -#test "$runlevel" || { runlevel=`runlevel`; runlevel=${runlevel#* }; } -#test "$runlevel" = 4 && ARG=-autolog || ARG=-noautolog - -# uncomment, if you want tons of debug info in your syslog -#ARG="$ARG -debug 255" - -# we use an alternative tdm master configuration file -ARG="$ARG -config $TDMCFG" - -# we source overrides. run-parts sorts the list in a predictable order -if [ -d "$TDMOVERRIDEDIR" ]; then - for part in $(run-parts --list "$TDMOVERRIDEDIR" 2>/dev/null || true); do - . "$part" - done -fi - -# we generate tdm configuration files -gentdmconf --in $TDMCFGDIR 1> /dev/null - -# we update tdm configuration files (only overridden values) -[ -n "$USEBACKGROUND" ] && sed -i "s|^#\?UseBackground=.*|UseBackground=$USEBACKGROUND|" $TDMCFG -[ -n "$BACKGROUNDCFG" ] && sed -i "s|^#\?BackgroundCfg=.*|BackgroundCfg=$BACKGROUNDCFG|" $TDMCFG -[ -n "$USETHEME" ] && sed -i "s|^#\?UseTheme=.*|UseTheme=$USETHEME|" $TDMCFG -[ -n "$THEME" ] && sed -i "s|^#\?Theme=.*|Theme=$THEME|" $TDMCFG -[ -n "$COMPOSITOR" ] && sed -i "s|^#\?Compositor=.*|Compositor=$COMPOSITOR|" $TDMCFG -[ -n "$WALLPAPER" ] && sed -i "s|^#\?Wallpaper=.*|Wallpaper=`readlink -f $WALLPAPER`|" $BACKGROUNDCFG - - -fi -# autologin overrides are useful for live debian environment -if [ -n "$AUTOLOGINUSER" ]; then - sed -i "s|^#\?AutoLoginEnable=.*|AutoLoginEnable=true|" $TDMCFG - sed -i "s|^#\?AutoLoginUser=.*|AutoLoginUser=$AUTOLOGINUSER|" $TDMCFG -fi -[ -n "$AUTOLOGINDELAY" ] && sed -i "s|^#\?AutoLoginDelay=.*|AutoLoginDelay=$AUTOLOGINDELAY|" $TDMCFG -[ -n "$AUTOLOGINAGAIN" ] && sed -i "s|^#\?AutoLoginAgain=.*|AutoLoginAgain=$AUTOLOGINAGAIN|" $TDMCFG -[ -n "$AUTOLOGINLOCKED" ] && sed -i "s|^#\?AutoLoginLocked=.*|AutoLoginLocked=$AUTOLOGINLOCKED|" $TDMCFG - -# If we upgraded the daemon, we can't use the --exec argument to -# start-stop-daemon since the inode will have changed. The risk here is that -# in a situation where the daemon died, its pidfile was not cleaned up, and -# some other process is now running under that pid, start-stop-daemon will send -# signals to an innocent process. However, this seems like a corner case. -# C'est la vie! -if [ -e $UPGRADEFILE ]; then - SSD_ARGS="--pidfile $PIDFILE --startas $DAEMON" -else - SSD_ARGS="--pidfile $PIDFILE --exec $DAEMON" -fi - -stillrunning () { - if expr "$(cat /proc/$DAEMONPID/cmdline 2> /dev/null)" : "$DAEMON" > /dev/null 2>&1; then - true - else - # if the daemon does not remove its own pidfile, we will - rm -f $PIDFILE $UPGRADEFILE - false - fi; -} - -case "$1" in - start) - if [ -e $DEFAULT_DISPLAY_MANAGER_FILE ] && - [ "$HEED_DEFAULT_DISPLAY_MANAGER" = "true" ] && - [ "$(cat $DEFAULT_DISPLAY_MANAGER_FILE)" != "$DAEMON" ]; then - log_warning_msg "Not starting Trinity Display Manager (tdm-trinity); it is not the default display manager." - log_action_end_msg 0 - else - log_action_begin_msg "Starting Trinity Display Manager: tdm-trinity" - if start-stop-daemon --start --quiet $SSD_ARGS -- $ARG; then - log_action_end_msg 0 - else - log_action_end_msg 0 - log_warning_msg "Trinity Display Manager tdm-trinity already running" - fi - fi - ;; - - restart) - /etc/init.d/tdm-trinity stop - if [ -f $PIDFILE ]; then - if stillrunning; then - exit 1 - fi - fi - /etc/init.d/tdm-trinity start - ;; - - reload) - log_action_begin_msg "Reloading Trinity Display Manager configuration..." - if start-stop-daemon --stop --signal 1 --quiet $SSD_ARGS; then - log_action_end_msg 0 - else - log_action_end_msg 1 - log_failure_msg "tdm-trinity not running." - fi - ;; - - force-reload) - /etc/init.d/tdm-trinity reload - ;; - - stop) - log_action_begin_msg "Stopping Trinity Display Manager: tdm-trinity" - if [ ! -f $PIDFILE ]; then - log_action_end_msg 0 - log_failure_msg "Trinity Display Manager tdm-trinity not running ($PIDFILE not found)." - exit 0 - else - DAEMONPID=$(cat $PIDFILE | tr -d '[:blank:]') - KILLCOUNT=1 - if [ ! -e $UPGRADEFILE ]; then - if start-stop-daemon --stop --quiet $SSD_ARGS; then - # give tdm's signal handler a second to catch its breath - sleep 1 - else - log_action_end_msg 0 - log_failure_msg "Trinity Display Manager tdm-trinity not running" - fi - fi - while [ $KILLCOUNT -le 5 ]; do - if stillrunning; then - kill $DAEMONPID - else - break - fi - sleep 1 - KILLCOUNT=$(( $KILLCOUNT + 1 )) - done - if stillrunning; then - log_action_end_msg 1 - log_failure_msg "Trinity Display Manager tdm-trinity not responding to TERM signal (pid $DAEMONPID)" - else - rm -f $UPGRADEFILE - fi - fi - log_action_end_msg 0 - - # Launches usplash on shutdown - if ( `grep -q '\( \|^\)splash\( \|$\)' /proc/cmdline` && `which usplash_down >/dev/null` ) ; then - usplash_down - fi - ;; - - *) - echo "Usage: /etc/init.d/tdm-trinity {start|stop|restart|reload|force-reload}" - exit 1 - ;; -esac - -exit 0 diff --git a/debian/lenny/tdebase/debian/tdm-trinity.maintscript b/debian/lenny/tdebase/debian/tdm-trinity.maintscript new file mode 100644 index 000000000..312950659 --- /dev/null +++ b/debian/lenny/tdebase/debian/tdm-trinity.maintscript @@ -0,0 +1 @@ +mv_conffile /etc/init.d/tdm-trinity /etc/init.d/tdm diff --git a/debian/lenny/tdebase/debian/tdm-trinity.postinst b/debian/lenny/tdebase/debian/tdm-trinity.postinst index 282662484..0dc696aaa 100644 --- a/debian/lenny/tdebase/debian/tdm-trinity.postinst +++ b/debian/lenny/tdebase/debian/tdm-trinity.postinst @@ -107,8 +107,10 @@ case "$1" in echo "Otherwise, /etc/trinity/tdm/Xservers is safe to remove." fi - - + if [ -f /etc/init.d/tdm-trinity ] && \ + [ ! -x "`which dpkg-maintscript-helper 2>/dev/null`" ]; then + rm -f /etc/init.d/tdm-trinity + fi ;; @@ -122,21 +124,25 @@ case "$1" in esac -if [ -x "/etc/init.d/tdm-trinity" ]; then +if [ -x "/etc/init.d/tdm" ]; then if [ -x "`which insserv 2>/dev/null`" ]; then - insserv tdm-trinity >/dev/null + insserv tdm >/dev/null else - update-rc.d tdm-trinity defaults 13 01 >/dev/null + if [ -x "`which update-rc.d 2>/dev/null`" ]; then + update-rc.d tdm defaults 13 01 >/dev/null + fi fi fi -if [ -n "$NOSTART" ]; then - exit 0 -else - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d tdm-trinity start || true +if [ ! -n "$NOSTART" ]; then + if [ -x "`which service 2>/dev/null`" ]; then + service tdm start || true else - /etc/init.d/tdm-trinity start || true + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d tdm start || true + else + /etc/init.d/tdm start || true + fi fi fi diff --git a/debian/lenny/tdebase/debian/tdm-trinity.postrm b/debian/lenny/tdebase/debian/tdm-trinity.postrm index 3dfb32123..0cd027c45 100644 --- a/debian/lenny/tdebase/debian/tdm-trinity.postrm +++ b/debian/lenny/tdebase/debian/tdm-trinity.postrm @@ -33,6 +33,15 @@ if [ "$1" = "purge" ]; then rm -f /var/log/tdm-trinity.log* fi +if [ "$1" = "purge" ] ; then + if [ -x "`which update-rc.d 2>/dev/null`" ]; then + update-rc.d tdm remove >/dev/null + fi +fi +if [ -d /run/systemd/system ] ; then + systemctl --system daemon-reload >/dev/null || true +fi + #DEBHELPER# exit 0 diff --git a/debian/lenny/tdebase/debian/tdm-trinity.preinst b/debian/lenny/tdebase/debian/tdm-trinity.preinst index 09163c460..c26af6803 100644 --- a/debian/lenny/tdebase/debian/tdm-trinity.preinst +++ b/debian/lenny/tdebase/debian/tdm-trinity.preinst @@ -9,6 +9,12 @@ case "$1" in rm -f /etc/trinity/tdm/pixmaps/XFree86.xpm rm -f /etc/trinity/tdm/Xresources rm -f /etc/menu-methods/tdm + + if [ -f /etc/init.d/tdm-trinity ]; then + if [ -x "`which update-rc.d 2>/dev/null`" ]; then + update-rc.d tdm-trinity remove >/dev/null + fi + fi ;; install) diff --git a/debian/lenny/tdebase/debian/tdm-trinity.prerm b/debian/lenny/tdebase/debian/tdm-trinity.prerm index 6247adb1f..c17a2451f 100644 --- a/debian/lenny/tdebase/debian/tdm-trinity.prerm +++ b/debian/lenny/tdebase/debian/tdm-trinity.prerm @@ -86,11 +86,17 @@ if grep -qs ^restart-on-upgrade /etc/trinity/tdm/tdm.options || fi if [ -n "$STOP" ]; then - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d tdm-trinity stop || true + if [ -x "`which service 2>/dev/null`" ]; then + service tdm stop || true else - /etc/init.d/tdm-trinity stop || true + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d tdm stop || true + else + /etc/init.d/tdm stop || true + fi fi + [ ! -e /var/run/tdm-trinity.upgrade ] || + rm -f /var/run/tdm-trinity.upgrade else if [ "$1" = "upgrade" -o "$1" = "failed-upgrade" ]; then touch /var/run/tdm-trinity.upgrade @@ -98,7 +104,7 @@ else fi if [ -n "$REMOVING" ]; then - rm -f /etc/init.d/tdm-trinity + rm -f /etc/init.d/tdm [ ! -e /etc/init/tdm-trinity.conf ] || \ rm -f /etc/init/tdm-trinity.conf fi @@ -178,4 +184,6 @@ if [ "$1" = "remove" -o "$1" = "deconfigure" ]; then fi fi +#DEBHELPER# + exit 0 diff --git a/debian/lenny/tdebase/debian/tdm-trinity.templates b/debian/lenny/tdebase/debian/tdm-trinity.templates index ac4f2df43..9c54e0e9d 100644 --- a/debian/lenny/tdebase/debian/tdm-trinity.templates +++ b/debian/lenny/tdebase/debian/tdm-trinity.templates @@ -23,8 +23,8 @@ Description: internal use only Template: tdm-trinity/stop_running_server_with_children Type: boolean Default: false -_Description: Stop the tdm-trinity daemon? - The Trinity Desktop manager (tdm-trinity) daemon is typically stopped on package upgrade +_Description: Stop the tdm daemon? + The Trinity Desktop manager (tdm) daemon is typically stopped on package upgrade and removal, but it appears to be managing at least one running X session. . If tdm is stopped now, any X sessions it manages will be terminated. diff --git a/debian/lenny/tdebase/debian/tdm.init b/debian/lenny/tdebase/debian/tdm.init new file mode 100644 index 000000000..664bbccb8 --- /dev/null +++ b/debian/lenny/tdebase/debian/tdm.init @@ -0,0 +1,202 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: x-display-manager tdm +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Should-Start: console-screen kbd acpid hal krb5-kdc ypbind +# Should-Stop: console-screen kbd +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: X display manager for Trinity +# Description: TDM manages a collection of X servers, which may be on the local host or remote machines. +### END INIT INFO +# /etc/init.d/tdm: start or stop the X display manager +# Script originally stolen from the xdm package +# +# description: Trinity Display Manager +# + +. /lib/lsb/init-functions + +set -e + +# To start tdm even if it is not the default display manager, change +# HEED_DEFAULT_DISPLAY_MANAGER to "false." +HEED_DEFAULT_DISPLAY_MANAGER=true +DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager + +TDEDIRS=/opt/trinity/ +PATH=/opt/trinity/bin:/bin:/usr/bin:/sbin:/usr/sbin +DAEMON=/opt/trinity/bin/tdm +PIDFILE=/var/run/tdm.pid +UPGRADEFILE=/var/run/tdm.upgrade + +# parameters to support tdm customization +TDMRC=/etc/trinity/tdm/tdmrc +BACKGROUNDRC=/etc/trinity/tdm/backgroundrc + +#if configuration is changed by tdmtheme or other tools, don't do magick +if grep -q "Theme=@@@ToBeReplacedByDesktopBase@@@" ${TDMRC} && grep -q "Wallpaper=default_blue.jpg" ${BACKGROUNDRC} +then + + + +TDMOVERRIDEDIR=/etc/default/tdm-trinity.d +TDMCFGDIR=/var/run/tdm-trinity +TDMCFG=$TDMCFGDIR/tdmrc +BACKGROUNDCFG=$TDMCFGDIR/backgroundrc + +test -x $DAEMON || exit 0 + +# uncomment, if you want auto-logon to be runlevel-dependant +#test "$runlevel" || { runlevel=`runlevel`; runlevel=${runlevel#* }; } +#test "$runlevel" = 4 && ARG=-autolog || ARG=-noautolog + +# uncomment, if you want tons of debug info in your syslog +#ARG="$ARG -debug 255" + +# we use an alternative tdm master configuration file +ARG="$ARG -config $TDMCFG" + +# we source overrides. run-parts sorts the list in a predictable order +if [ -d "$TDMOVERRIDEDIR" ]; then + for part in $(run-parts --list "$TDMOVERRIDEDIR" 2>/dev/null || true); do + . "$part" + done +fi + +# we generate tdm configuration files +gentdmconf --in $TDMCFGDIR 1> /dev/null + +# we update tdm configuration files (only overridden values) +[ -n "$USEBACKGROUND" ] && sed -i "s|^#\?UseBackground=.*|UseBackground=$USEBACKGROUND|" $TDMCFG +[ -n "$BACKGROUNDCFG" ] && sed -i "s|^#\?BackgroundCfg=.*|BackgroundCfg=$BACKGROUNDCFG|" $TDMCFG +[ -n "$USETHEME" ] && sed -i "s|^#\?UseTheme=.*|UseTheme=$USETHEME|" $TDMCFG +[ -n "$THEME" ] && sed -i "s|^#\?Theme=.*|Theme=$THEME|" $TDMCFG +[ -n "$COMPOSITOR" ] && sed -i "s|^#\?Compositor=.*|Compositor=$COMPOSITOR|" $TDMCFG +[ -n "$WALLPAPER" ] && sed -i "s|^#\?Wallpaper=.*|Wallpaper=`readlink -f $WALLPAPER`|" $BACKGROUNDCFG + + +fi +# autologin overrides are useful for live debian environment +if [ -n "$AUTOLOGINUSER" ]; then + sed -i "s|^#\?AutoLoginEnable=.*|AutoLoginEnable=true|" $TDMCFG + sed -i "s|^#\?AutoLoginUser=.*|AutoLoginUser=$AUTOLOGINUSER|" $TDMCFG +fi +[ -n "$AUTOLOGINDELAY" ] && sed -i "s|^#\?AutoLoginDelay=.*|AutoLoginDelay=$AUTOLOGINDELAY|" $TDMCFG +[ -n "$AUTOLOGINAGAIN" ] && sed -i "s|^#\?AutoLoginAgain=.*|AutoLoginAgain=$AUTOLOGINAGAIN|" $TDMCFG +[ -n "$AUTOLOGINLOCKED" ] && sed -i "s|^#\?AutoLoginLocked=.*|AutoLoginLocked=$AUTOLOGINLOCKED|" $TDMCFG + +# If we upgraded the daemon, we can't use the --exec argument to +# start-stop-daemon since the inode will have changed. The risk here is that +# in a situation where the daemon died, its pidfile was not cleaned up, and +# some other process is now running under that pid, start-stop-daemon will send +# signals to an innocent process. However, this seems like a corner case. +# C'est la vie! +if [ -e $UPGRADEFILE ]; then + SSD_ARGS="--pidfile $PIDFILE --startas $DAEMON" +else + SSD_ARGS="--pidfile $PIDFILE --exec $DAEMON" +fi + +stillrunning () { + if expr "$(cat /proc/$DAEMONPID/cmdline 2> /dev/null)" : "$DAEMON" > /dev/null 2>&1; then + true + else + # if the daemon does not remove its own pidfile, we will + rm -f $PIDFILE $UPGRADEFILE + false + fi; +} + +case "$1" in + start) + if [ -e $DEFAULT_DISPLAY_MANAGER_FILE ] && + [ "$HEED_DEFAULT_DISPLAY_MANAGER" = "true" ] && + [ "$(cat $DEFAULT_DISPLAY_MANAGER_FILE)" != "$DAEMON" ]; then + log_warning_msg "Not starting Trinity Display Manager (tdm); it is not the default display manager." + log_action_end_msg 0 + else + log_action_begin_msg "Starting Trinity Display Manager: tdm" + if start-stop-daemon --start --quiet $SSD_ARGS -- $ARG; then + log_action_end_msg 0 + else + log_action_end_msg 0 + log_warning_msg "Trinity Display Manager (tdm) already running" + fi + fi + ;; + + restart) + /etc/init.d/tdm stop + if [ -f $PIDFILE ]; then + if stillrunning; then + exit 1 + fi + fi + /etc/init.d/tdm start + ;; + + reload) + log_action_begin_msg "Reloading Trinity Display Manager configuration..." + if start-stop-daemon --stop --signal 1 --quiet $SSD_ARGS; then + log_action_end_msg 0 + else + log_action_end_msg 1 + log_failure_msg "tdm not running." + fi + ;; + + force-reload) + /etc/init.d/tdm reload + ;; + + stop) + log_action_begin_msg "Stopping Trinity Display Manager: tdm" + if [ ! -f $PIDFILE ]; then + log_action_end_msg 0 + log_failure_msg "Trinity Display Manager (tdm) not running ($PIDFILE not found)." + exit 0 + else + DAEMONPID=$(cat $PIDFILE | tr -d '[:blank:]') + KILLCOUNT=1 + if [ ! -e $UPGRADEFILE ]; then + if start-stop-daemon --stop --quiet $SSD_ARGS; then + # give tdm's signal handler a second to catch its breath + sleep 1 + else + log_action_end_msg 0 + log_failure_msg "Trinity Display Manager (tdm) not running" + fi + fi + while [ $KILLCOUNT -le 5 ]; do + if stillrunning; then + kill $DAEMONPID + else + break + fi + sleep 1 + KILLCOUNT=$(( $KILLCOUNT + 1 )) + done + if stillrunning; then + log_action_end_msg 1 + log_failure_msg "Trinity Display Manager (tdm) not responding to TERM signal (pid $DAEMONPID)" + else + rm -f $UPGRADEFILE + fi + fi + log_action_end_msg 0 + + # Launches usplash on shutdown + if ( `grep -q '\( \|^\)splash\( \|$\)' /proc/cmdline` && `which usplash_down >/dev/null` ) ; then + usplash_down + fi + ;; + + *) + echo "Usage: /etc/init.d/tdm {start|stop|restart|reload|force-reload}" + exit 1 + ;; +esac + +exit 0 -- cgit v1.2.1