[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Placement of console device for `virtual-dev' package



miquels@cistron.nl (Miquel van Smoorenburg) wrote:
>Charles Briscoe-Smith <cpb4@ukc.ac.uk> wrote:
>>Unfortunately, when init runs the shut-down rc script, it opens
>>/dev/console and passes this as stdin/out/err to the script, and this
>>prevents umount from unmounting /dev.
>
>So the shutdown script should be modified. How about this:
>
>if grep -q " /dev " /etc/mtab
>then
>	# /dev is on a seperate FS.
>	exec 0>&- 1>&- 2>&-
>	reopen=1
>fi
>umount -a
>if [ "$reopen" ]
>then
>	exec 0<>/dev/console 1>&0 2>&0
>fi

Well, having now played around with this a bit, I found that it doesn't
work.  umount's warning doesn't appear any more, but that's just
because it has no way of communicating with the outside world -- /dev
is still mounted afterwards.

It seems that this is because /etc/init.d/{halt,reboot} is run by
/etc/init.d/rc, which still has its std{in,out,err} connected to
/dev/console.  I'm beginning to think that it would be best just to
remove /dev from /etc/fstab and be done with it.  /dev wouldn't be
unmounted, but this causes no problem, at least that I can detect.

--Charles Briscoe-Smith
White pages entry, with PGP key: <URL:http://alethea.ukc.ac.uk/wp?95cpb4>
PGP public keyprint: 74 68 AB 2E 1C 60 22 94  B8 21 2D 01 DE 66 13 E2


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: