rendered paste bodysu#!/bin/sh
#
# Originally based on: gdm /etc/init.d script on debian
#
# THIS DOESN'T WORK YET atmos - May 6, 2002
# THIS DOES WORK! atmos - May 27, 2002
# THIS WORKS WITH LSB! azundris - May 23, 2004
# /etc/init.d/entrance
#
### BEGIN INIT INFO
# Provides: entrance
# Required-Start: $remote_fs
# X-UnitedLinux-Should-Start: ypbind hwscan $syslog gpm
# Required-Stop:
# Default-Start: 5
# Default-Stop:
# Description: X Display Manager
### END INIT INFO
set -e
# HEED_DEFAULT_DISPLAY_MANAGER to "false."
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/e17/sbin:/opt/e17/bin
DAEMON=/opt/e17/sbin/entranced
PIDFILE=/var/run/entranced.pid
test -x $DAEMON || exit 0
case "$1" in
start)
echo -n "Becoming entranced: entrance"
(cd /etc/pam.d ; for i in gdm kdm wdm xdm ; do test -s $i && cp -a $i entrance && break ; done)
$DAEMON
echo "."
;;
stop)
echo -n "Stopping Entrance: entrance"
if [ -f $PIDFILE ]; then kill -9 `cat $PIDFILE` ; fi
echo "."
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
exit 0