Source-Changes-HG archive

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

[src/trunk]: src/distrib/vax/cdroms/installcd Make it deal with /dev being th...



details:   https://anonhg.NetBSD.org/src/rev/175c4726f525
branches:  trunk
changeset: 796366:175c4726f525
user:      martin <martin%NetBSD.org@localhost>
date:      Fri May 30 13:19:42 2014 +0000

description:
Make it deal with /dev being the result of a "MAKDEV all" instead of
"MAKEDEV init" by mounting a ptyfs if needed.

diffstat:

 distrib/vax/cdroms/installcd/etc.rc |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r 5afa05aeb9cc -r 175c4726f525 distrib/vax/cdroms/installcd/etc.rc
--- a/distrib/vax/cdroms/installcd/etc.rc       Fri May 30 13:14:47 2014 +0000
+++ b/distrib/vax/cdroms/installcd/etc.rc       Fri May 30 13:19:42 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: etc.rc,v 1.2 2014/05/23 12:25:46 martin Exp $
+# $NetBSD: etc.rc,v 1.3 2014/05/30 13:19:42 martin Exp $
 #
 # Copyright (c) 1997 Perry E. Metzger
 # Copyright (c) 1994 Christopher G. Demetriou
@@ -51,6 +51,16 @@
        exec sh
 }
 
+# if /dev has not been populated by init, it may be a stock "MAKEDEV all"
+# variant without "opty" - in which case we need to mount a ptyfs
+if [ ! -r /dev/ttypf ]; then
+       if mount | grep '^ptyfs on /dev/pts' >/dev/null 2>&1; then
+               # do not mount it again
+       else
+               mount -t ptyfs ptyfs /dev/pts
+       fi
+fi
+
 # mount a few tempfs to allow modifications over the CD contents
 mount -t tmpfs tmpfs /tmp || lowmemfail
 mount -t tmpfs tmpfs /var || lowmemfail



Home | Main Index | Thread Index | Old Index