Module Name:    src
Committed By:   mrg
Date:           Fri Apr 25 00:23:26 UTC 2014

Modified Files:
        src/usr.sbin/postinstall: postinstall

Log Message:
don't apply "ptyfsoldnodes" if /dev/pts does not exist, even if ptyfs
is listed in /etc/fstab.  without this, postinstall happily removes
all your ptys leaving you with none at all.  return an error if we
have ptyfs in /etc/fstab, but no /dev/pts.


To generate a diff of this commit:
cvs rdiff -u -r1.165 -r1.166 src/usr.sbin/postinstall/postinstall

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

Modified files:

Index: src/usr.sbin/postinstall/postinstall
diff -u src/usr.sbin/postinstall/postinstall:1.165 src/usr.sbin/postinstall/postinstall:1.166
--- src/usr.sbin/postinstall/postinstall:1.165	Sat Mar  8 16:36:24 2014
+++ src/usr.sbin/postinstall/postinstall	Fri Apr 25 00:23:26 2014
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.165 2014/03/08 16:36:24 martin Exp $
+# $NetBSD: postinstall,v 1.166 2014/04/25 00:23:26 mrg Exp $
 #
 # Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1790,6 +1790,11 @@ do_ptyfsoldnodes()
 		return 0
 	fi
 
+	if [ ! -e "${DEST_DIR}/dev/pts" ]; then
+		msg "ptyfs is not properly configured: missing /dev/pts"
+		return 1
+	fi
+
 	# Find the device major numbers for the pty master and slave
 	# devices, by parsing the output from "MAKEDEV -s pty0".
 	#

Reply via email to