#!/bin/bash #%rlevels: 5:s 0:k 1:k 2:k 3:k 4:k 6:k #%start: 95 #%stop: 05 #deps #%needs: #%before: #%after: # $Header: /home/cvsd/alx-cvs/alx-src/tinyalxconfig-ng/init.d/xdm-alx,v 1.1 2008-06-04 16:47:56 niro Exp $ source /etc/sysconfig/rc source $rc_functions case $1 in start) echo -e ${COLOREDSTAR}"Starting single X11 session ..." start-stop-daemon --start --background \ --make-pidfile /var/run/X-no-wm.pid \ --pidfile /var/run/X-no-wm.pid \ --exec /usr/sbin/X-no-wm evaluate_retval update_svcstatus $1 splash svc_started "$(basename $0)" 0 ;; stop) echo -e ${COLOREDSTAR}"Stopping single X11 session ..." if [ -n "$(pidof xinit)" ] then CUR_VT=$(fgconsole) start-stop-daemon --stop --exec /usr/X11R6/bin/xinit evaluate_retval chvt ${CUR_VT} else # process not running; print a message print_status warning not_running fi [ -f /var/run/X-no-wm.pid ] && rm /var/run/X-no-wm.pid update_svcstatus $1 splash svc_stopped "$(basename $0)" 0 ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc xinit ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac