Source-Changes-HG archive

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

[src/trunk]: src/etc/etc.i386 Don't barf when we have fdesc mounted. Just ski...



details:   https://anonhg.NetBSD.org/src/rev/0acc71ad94b3
branches:  trunk
changeset: 473309:0acc71ad94b3
user:      christos <christos%NetBSD.org@localhost>
date:      Fri May 28 21:00:50 1999 +0000

description:
Don't barf when we have fdesc mounted. Just skip the devices fdesc provides

diffstat:

 etc/etc.i386/MAKEDEV |  45 +++++++++++++++++++++++++++++----------------
 1 files changed, 29 insertions(+), 16 deletions(-)

diffs (83 lines):

diff -r 90018322e8f3 -r 0acc71ad94b3 etc/etc.i386/MAKEDEV
--- a/etc/etc.i386/MAKEDEV      Fri May 28 20:49:51 1999 +0000
+++ b/etc/etc.i386/MAKEDEV      Fri May 28 21:00:50 1999 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#      $NetBSD: MAKEDEV,v 1.83 1999/03/26 04:37:29 mrg Exp $
+#      $NetBSD: MAKEDEV,v 1.84 1999/05/28 21:00:50 christos Exp $
 #
 # Copyright (c) 1990 The Regents of the University of California.
 # All rights reserved.
@@ -104,6 +104,14 @@
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 umask 77
 
+# Check if we have fdesc mounted
+df fd | grep -q fdesc
+if [ $? = 0 ]; then
+       nofdesc=false
+else
+       nofdesc=true
+fi
+
 for i
 do
 
@@ -141,7 +149,7 @@
        ;;
 
 std)
-       rm -f console drum mem kmem null zero io tty klog stdin stdout stderr
+       rm -f console drum mem kmem null zero io klog
        mknod console           c 0 0
        mknod drum              c 4 0   ; chmod 640 drum ; chgrp kmem drum
        mknod kmem              c 2 1   ; chmod 640 kmem ; chgrp kmem kmem
@@ -149,11 +157,14 @@
        mknod null              c 2 2   ; chmod 666 null
        mknod zero              c 2 12  ; chmod 666 zero
        mknod io                c 2 14  ; chmod 640 io ; chgrp kmem io
-       mknod tty               c 1 0   ; chmod 666 tty
        mknod klog              c 7 0   ; chmod 600 klog
-       mknod stdin             c 22 0  ; chmod 666 stdin
-       mknod stdout            c 22 1  ; chmod 666 stdout
-       mknod stderr            c 22 2  ; chmod 666 stderr
+       if $nofdesc; then
+               rm -f tty stdin stdout stderr
+               mknod tty       c 1 0   ; chmod 666 tty
+               mknod stdin     c 22 0  ; chmod 666 stdin
+               mknod stdout    c 22 1  ; chmod 666 stdout
+               mknod stderr    c 22 2  ; chmod 666 stderr
+       fi
        ;;
 
 usb*)
@@ -250,16 +261,18 @@
        ;;
 
 fd)
-       rm -f fd/*
-       mkdir fd > /dev/null 2>&1
-       n=0
-       while [ $n -lt 64 ]; do
-               mknod fd/$n c 22 $n
-               n=$(($n + 1))
-       done
-       chown -R root.wheel fd
-       chmod 755 fd
-       chmod 666 fd/*
+       if $nofdesc; then
+               rm -f fd/*
+               mkdir fd > /dev/null 2>&1
+               n=0
+               while [ $n -lt 64 ]; do
+                       mknod fd/$n c 22 $n
+                       n=$(($n + 1))
+               done
+               chown -R root.wheel fd
+               chmod 755 fd
+               chmod 666 fd/*
+       fi
        ;;
 
 wt*)



Home | Main Index | Thread Index | Old Index