DJ Lucas wrote:
> We have two different methods for two packages that provide the similar
> functionality. Currently for xdm, we run the service from inititab when
> entering runlevel 5. For gdm, we provide a bootscript that runs as the
> last startup script in runlevel 5. I don't think it's right that they
> differ, at least without providing both options, and kdm currently isn't
> mentioned at all. I'm unable to check any distro's right now to see how
> they handle it, but suspect that using a starup script is a bad idea
> from a distro's POV because lots of unknown services install blindly to
> S99whatever. I suggest we provide both a bootscript and the inittab
> change for all three packages, and let the user decide how they want it
> done...of course, IMO, push the inittab version first!
For comparison:
RHEL4 and RH9:
inittab:
# Run xdm in runlevel 5
x:5:respawn:/etc/X11/prefdm -nodaemon
SuSE SLES-8 (AMD64) (8.1):
$cat /etc/rc.d/rc5.d/S16xdm + some deletions
===============
#import stuff... startproc, rc_failed, rc_status
locale_vars="\
LANG \
LC_ALL \
LC_MESSAGES \
LC_CTYPE \
LC_COLLATE \
LC_TIME \
LC_NUMERIC \
LC_MONETARY"
for var in $locale_vars
do
if eval test -z "\$$var"; then
eval $var="\$RC_$var"
export $var
fi
done
PIDFILE=""
KDEROOTHOME=/root/.kdm
export KDEROOTHOME
case "$DISPLAYMANAGER" in
kdm|kde|KDM|KDE) PIDFILE="-p /var/run/xdm.pid"
DISPLAYMANAGER=/opt/kde/bin/kdm
test -x /opt/kde2/bin/kdm && \
DISPLAYMANAGER=/opt/kde2/bin/kdm
test -x /opt/kde3/bin/kdm && \
DISPLAYMANAGER=/opt/kde3/bin/kdm ;;
gdm|GDM|Gnome|GNOME) DISPLAYMANAGER=/opt/gnome2/bin/gdm ;;
wdm|WDM) DISPLAYMANAGER=/usr/X11R6/bin/wdm ;;
console) exit 0 ;;
*) DISPLAYMANAGER=/usr/X11R6/bin/xdm ;;
esac
test ! -x "$DISPLAYMANAGER" && DISPLAYMANAGER=/usr/X11R6/bin/xdm
DM=${DISPLAYMANAGER##*/}
case "$1" in
start)
echo -n "Starting service $DM"
startproc $PIDFILE $DISPLAYMANAGER || rc_failed
# After a crash or a kill signal we may have
# a wrong owner ship of /dev/xconsole
if rc_status ; then
if test -x /etc/X11/xdm/TakeDevices ; then
/etc/X11/xdm/TakeDevices
else
chown root:tty /dev/xconsole /dev/tty0
chmod 622 /dev/xconsole /dev/tty0
fi
fi
rc_status -v
;;
==================
The drawback to the inittab method is that there is easy way to abort
it. The only way I can think of is to C-A-F1, log in and edit inittab
to comment out the respawn line, and run `inittab q`.
With the startup script, you only need to `/etc/init.d/xdm stop`.
There are advantages and disadvantages to both methods.
However, I'm not sure my opinion should count here as I don't like ?dm
at all. I always start at run level 3 and do startx.
-- Bruce
--
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page