I have a perl/Tk program running in X which has a shutdown button. If
i startx and run said button it shuts down X and shuts down my box nice and
cleanly. If i have the respawn option set in my inittab like so:
# The default runlevel.
id:2:initdefault:
# System initialization.
si:2:sysinit:/rc.init
mi:2:wait:/etc/rcS
# Things to run in every runlevel.
ud:25

nce:/sbin/update
# Start X
co:2:respawn:/bin/su user -c /bin/xstart
l0:0:wait:/etc/init.d/halt
l6:6:wait:/etc/init.d/reboot
It will reboot albeit not cleanly at all and leaves the /tmp/.X0-lock behind.
if i set the button to do a shutdown -h now it halts but X doesnt shutdown,
this method is also unclean and leaves the horrible lock file behind.
Anyone know why this is happening? I thought the shutdown command changes the
runlevel?