I thought I would send this to the list in case someone would find it useful. It won't be put into CVS as xcomp doesn't want to pollute his CVS tree with anything too distro specific.
At any rate, this is an initscript for Fedora/Redhat that has chkconfig capabilities and follows the standard initscript flow. It will activate in runlevel 3. You do not want to be in runlevel 6 as that will activate the normal display manager.
I plan on eventually filing a patch with fedora's bugzilla to allow more freedom in the way you can choose a display manager since I can't seem to find a way to generically choose a display manager without modifying system scripts. If anyone knows of a way, let me know. It seems you can only choose it generically like Gnome or KDE.
FYI - I don't really use a display manager. I tried it out and saw a need for this. It worked for me - YMMV.
//========================================================\\ || D. Hageman <[email protected]> || \\========================================================//
#!/bin/sh # # entranced This shell script takes care of the starting and stopping # of entranced. # # chkconfig: 3 99 01 # description: Entrance is a extremely customizable and aesthetically # attractive login/display manager.
# Source function library.
. /etc/rc.d/init.d/functions
[ -f /usr/sbin/entranced ] || exit 0
RETVAL=0
prog="entranced"
start() {
if [ ! -f /var/lock/subsys/entranced ]; then
echo -n $"Starting $prog: "
daemon entranced -d $OPTS
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/entranced
else
return 0
fi
return $RETVAL
}
stop() {
if test "x`pidof entranced`" != x; then
echo -n $"Stopping $prog: "
killproc entranced -INT
sleep 1
echo
fi
if test "x`pidof entranced`" != x; then
killproc entranced
fi
RETVAL=$?
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/entranced
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status entranced
;;
restart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac
exit $RETVAL
