*- On 26 Sep, Salman Ahmed wrote about "Re: shutting down X" >>>>>> "Salman" == Salman Ahmed <[EMAIL PROTECTED]> writes: > > Salman> Ok. I'll also check RedHat-5.2 to see what /dev/console points > Salman> to under there. Then I'll try symlinking it to /dev/tty1 and > Salman> see if that solves my problem. BTW, under RH5.2, I am running > Salman> kernel 2.2.10 and it doesn't have this `problem'. > > Followup: > > Under RedHat-5.2 (w/kernel 2.2.10), /dev/console is not a symlink to > any device. It seems to be a `true/pure' device. > > For Debian 2.1, I changed /dev/console to point to /dev/tty1 instead > of /dev/tty0 and now I get the behaviour I want ie when I shutdown I > see all the service shutdown/stop messages. > > My questions are : > > Salman> I am curious to know : what are the ramifications of changing > Salman> /dev/console to point to /dev/tty1 instead of /dev/tty0 ? > > and also why /dev/console should be a symlink to some other device ? > > Why not make it a device itself (like RedHat 5.2 has) ? >
If you issue 'cd /dev; ./MAKEDEV console' it will create the device file console. It will behave in exactly the same way that tty0 does as specified in the console man page. Either one will put its output on the currently active console. Since tty7 was the last active console then the output is sent there. The only ramification of having it symlinked to tty1 is that all system messages that are destined for console get sent to tty1 regardless of the current console activity or who is logged into tty1. I prefer this since I like to see the shutdown messages when I have to shutdown. I don't know which kernel RH 5.2 was based on, was it 2.0.x or 2.2.x? Apparently the console device was not around in the 2.0.x days, which Debian 2.1 is based on, so a symlink was used then. In 2.2.x kernels it was moved to a device file. This code segment is from the MAKEDEV script on my Debian box, notice how it is makes a symlink for 2.0.x kernels and a device file for 2.2.x or greater: console) major=`Major vcs` # not fatal makedev tty0 c 4 0 $cons # console # new kernels need a device, old ones a symlink... sigh kern_rev1=`uname -r | awk -F'.' '{print $1}'` kern_rev2=`uname -r | awk -F'.' '{print $2}'` if [ $kern_rev1 -gt 2 ] then makedev console c 5 1 $cons else if [ $kern_rev1 -eq 2 -a $kern_rev2 -ge 1 ] then makedev console c 5 1 $cons else symlink console tty0 fi fi HTH, -- Brian --------------------------------------------------------------------- Mechanical Engineering [EMAIL PROTECTED] Purdue University http://www.ecn.purdue.edu/~servis ---------------------------------------------------------------------