Re: Placement of console device for `virtual-dev' package
In article <199710011324.OAA26728@ash.ukc.ac.uk>,
Charles Briscoe-Smith <email@example.com> wrote:
>Hello fellow developers,
>I have a few small problems with the `virtual-dev' package I've
>uploaded to project/experimental...
>The package copies /dev to a ramdisk and mounts this over the top of
>the normal /dev in an rc.boot script. It also adds an entry to
>/etc/fstab for the ramdisk so that umount can unmount it cleanly when
>the machine is shut down.
>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
# /dev is on a seperate FS.
exec 0>&- 1>&- 2>&-
if [ "$reopen" ]
exec 0<>/dev/console 1>&0 2>&0
| Miquel van Smoorenburg | |
| firstname.lastname@example.org | Owners of digital watches, your days are numbered. |
| PGP fingerprint: FE 66 52 4F CD 59 A5 36 7F 39 8B 20 F1 D6 74 02 |
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to email@example.com .