|
|
@ -1,16 +1,16 @@
|
|
|
|
#!/bin/sh
|
|
|
|
#!/bin/sh
|
|
|
|
### BEGIN INIT INFO
|
|
|
|
### BEGIN INIT INFO
|
|
|
|
# Provides: x-display-manager tdm-trinity
|
|
|
|
# Provides: x-display-manager tdm
|
|
|
|
# Required-Start: $local_fs $remote_fs
|
|
|
|
# Required-Start: $local_fs $remote_fs
|
|
|
|
# Required-Stop: $local_fs $remote_fs
|
|
|
|
# Required-Stop: $local_fs $remote_fs
|
|
|
|
# Should-Start: console-screen kbd acpid hal krb5-kdc nis
|
|
|
|
# Should-Start: console-screen kbd acpid hal krb5-kdc ypbind
|
|
|
|
# Should-Stop: console-screen kbd
|
|
|
|
# Should-Stop: console-screen kbd
|
|
|
|
# Default-Start: 2 3 4 5
|
|
|
|
# Default-Start: 2 3 4 5
|
|
|
|
# Default-Stop: 0 1 6
|
|
|
|
# Default-Stop: 0 1 6
|
|
|
|
# Short-Description: X display manager for Trinity
|
|
|
|
# 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.
|
|
|
|
# Description: TDM manages a collection of X servers, which may be on the local host or remote machines.
|
|
|
|
### END INIT INFO
|
|
|
|
### END INIT INFO
|
|
|
|
# /etc/init.d/tdm-trinity: start or stop the X display manager
|
|
|
|
# /etc/init.d/tdm: start or stop the X display manager
|
|
|
|
# Script originally stolen from the xdm package
|
|
|
|
# Script originally stolen from the xdm package
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# description: Trinity Display Manager
|
|
|
|
# description: Trinity Display Manager
|
|
|
@ -20,7 +20,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
|
|
# To start tdm-trinity even if it is not the default display manager, change
|
|
|
|
# To start tdm even if it is not the default display manager, change
|
|
|
|
# HEED_DEFAULT_DISPLAY_MANAGER to "false."
|
|
|
|
# HEED_DEFAULT_DISPLAY_MANAGER to "false."
|
|
|
|
HEED_DEFAULT_DISPLAY_MANAGER=true
|
|
|
|
HEED_DEFAULT_DISPLAY_MANAGER=true
|
|
|
|
DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
|
|
|
|
DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
|
|
|
@ -114,27 +114,27 @@ case "$1" in
|
|
|
|
if [ -e $DEFAULT_DISPLAY_MANAGER_FILE ] &&
|
|
|
|
if [ -e $DEFAULT_DISPLAY_MANAGER_FILE ] &&
|
|
|
|
[ "$HEED_DEFAULT_DISPLAY_MANAGER" = "true" ] &&
|
|
|
|
[ "$HEED_DEFAULT_DISPLAY_MANAGER" = "true" ] &&
|
|
|
|
[ "$(cat $DEFAULT_DISPLAY_MANAGER_FILE)" != "$DAEMON" ]; then
|
|
|
|
[ "$(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_warning_msg "Not starting Trinity Display Manager (tdm); it is not the default display manager."
|
|
|
|
log_action_end_msg 0
|
|
|
|
log_action_end_msg 0
|
|
|
|
else
|
|
|
|
else
|
|
|
|
log_action_begin_msg "Starting Trinity Display Manager: tdm-trinity"
|
|
|
|
log_action_begin_msg "Starting Trinity Display Manager: tdm"
|
|
|
|
if start-stop-daemon --start --quiet $SSD_ARGS -- $ARG; then
|
|
|
|
if start-stop-daemon --start --quiet $SSD_ARGS -- $ARG; then
|
|
|
|
log_action_end_msg 0
|
|
|
|
log_action_end_msg 0
|
|
|
|
else
|
|
|
|
else
|
|
|
|
log_action_end_msg 0
|
|
|
|
log_action_end_msg 0
|
|
|
|
log_warning_msg "Trinity Display Manager tdm-trinity already running"
|
|
|
|
log_warning_msg "Trinity Display Manager (tdm) already running"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
|
|
restart)
|
|
|
|
restart)
|
|
|
|
/etc/init.d/tdm-trinity stop
|
|
|
|
/etc/init.d/tdm stop
|
|
|
|
if [ -f $PIDFILE ]; then
|
|
|
|
if [ -f $PIDFILE ]; then
|
|
|
|
if stillrunning; then
|
|
|
|
if stillrunning; then
|
|
|
|
exit 1
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
/etc/init.d/tdm-trinity start
|
|
|
|
/etc/init.d/tdm start
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
|
|
reload)
|
|
|
|
reload)
|
|
|
@ -143,19 +143,19 @@ case "$1" in
|
|
|
|
log_action_end_msg 0
|
|
|
|
log_action_end_msg 0
|
|
|
|
else
|
|
|
|
else
|
|
|
|
log_action_end_msg 1
|
|
|
|
log_action_end_msg 1
|
|
|
|
log_failure_msg "tdm-trinity not running."
|
|
|
|
log_failure_msg "tdm not running."
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
|
|
force-reload)
|
|
|
|
force-reload)
|
|
|
|
/etc/init.d/tdm-trinity reload
|
|
|
|
/etc/init.d/tdm reload
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
|
|
stop)
|
|
|
|
stop)
|
|
|
|
log_action_begin_msg "Stopping Trinity Display Manager: tdm-trinity"
|
|
|
|
log_action_begin_msg "Stopping Trinity Display Manager: tdm"
|
|
|
|
if [ ! -f $PIDFILE ]; then
|
|
|
|
if [ ! -f $PIDFILE ]; then
|
|
|
|
log_action_end_msg 0
|
|
|
|
log_action_end_msg 0
|
|
|
|
log_failure_msg "Trinity Display Manager tdm-trinity not running ($PIDFILE not found)."
|
|
|
|
log_failure_msg "Trinity Display Manager (tdm) not running ($PIDFILE not found)."
|
|
|
|
exit 0
|
|
|
|
exit 0
|
|
|
|
else
|
|
|
|
else
|
|
|
|
DAEMONPID=$(cat $PIDFILE | tr -d '[:blank:]')
|
|
|
|
DAEMONPID=$(cat $PIDFILE | tr -d '[:blank:]')
|
|
|
@ -166,7 +166,7 @@ case "$1" in
|
|
|
|
sleep 1
|
|
|
|
sleep 1
|
|
|
|
else
|
|
|
|
else
|
|
|
|
log_action_end_msg 0
|
|
|
|
log_action_end_msg 0
|
|
|
|
log_failure_msg "Trinity Display Manager tdm-trinity not running"
|
|
|
|
log_failure_msg "Trinity Display Manager (tdm) not running"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
while [ $KILLCOUNT -le 5 ]; do
|
|
|
|
while [ $KILLCOUNT -le 5 ]; do
|
|
|
@ -180,7 +180,7 @@ case "$1" in
|
|
|
|
done
|
|
|
|
done
|
|
|
|
if stillrunning; then
|
|
|
|
if stillrunning; then
|
|
|
|
log_action_end_msg 1
|
|
|
|
log_action_end_msg 1
|
|
|
|
log_failure_msg "Trinity Display Manager tdm-trinity not responding to TERM signal (pid $DAEMONPID)"
|
|
|
|
log_failure_msg "Trinity Display Manager (tdm) not responding to TERM signal (pid $DAEMONPID)"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
rm -f $UPGRADEFILE
|
|
|
|
rm -f $UPGRADEFILE
|
|
|
|
fi
|
|
|
|
fi
|
|
|
@ -194,7 +194,7 @@ case "$1" in
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
|
|
*)
|
|
|
|
*)
|
|
|
|
echo "Usage: /etc/init.d/tdm-trinity {start|stop|restart|reload|force-reload}"
|
|
|
|
echo "Usage: /etc/init.d/tdm {start|stop|restart|reload|force-reload}"
|
|
|
|
exit 1
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
esac
|