Module Name:    src
Committed By:   martin
Date:           Fri May 30 13:19:43 UTC 2014

Modified Files:
        src/distrib/vax/cdroms/installcd: etc.rc

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


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/vax/cdroms/installcd/etc.rc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/vax/cdroms/installcd/etc.rc
diff -u src/distrib/vax/cdroms/installcd/etc.rc:1.2 src/distrib/vax/cdroms/installcd/etc.rc:1.3
--- src/distrib/vax/cdroms/installcd/etc.rc:1.2	Fri May 23 12:25:46 2014
+++ src/distrib/vax/cdroms/installcd/etc.rc	Fri May 30 13:19:42 2014
@@ -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 @@ EOM
 	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

Reply via email to