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/f5088d03e59f
branches:  trunk
changeset: 329605:f5088d03e59f
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 6763c014e2ac -r f5088d03e59f 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