[BACK]Return to MAKEDEV.tmpl CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / etc

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

Diff for /src/etc/MAKEDEV.tmpl between version 1.118 and 1.119

version 1.118, 2008/11/28 16:04:31 version 1.119, 2009/01/03 08:49:03
Line 287 
Line 287 
   
   
 #  #
 # Apart from a few lines right at the end, this file should consist  # NOTE:
 # entirely of function definitions.  
 #  #
 # This file is used both as a standalone script (via "sh ./MAKEDEV all"  # * MAKEDEV is used both as a standalone script (via "sh ./MAKEDEV
 # or similar), and as a function library (via "MAKEDEV_AS_LIBRARY=1 .  #   all" or similar), and as a function library for MAKEDEV.local (via
 # MAKEDEV" from MAKEDEV.local).  #   "MAKEDEV_AS_LIBRARY=1 . MAKEDEV").  Because of this, the script
   #   should consist almost entirely of function definitions, apart from a
   #   few lines right at the end.
   #
   # * MAKEDEV may be executed in an environment that is missing some
   #   common commands.  For example, it may be executed from a minimal
   #   system used during installation, or it may be executed early in the
   #   boot sequence before most file systems have been mounted.  It may
   #   also be executed in a cross-build environment on a non-NetBSD host.
 #  #
   
 usage()  usage()
Line 476  setup()
Line 483  setup()
         # only allow read&write for owner by default          # only allow read&write for owner by default
         umask 077          umask 077
   
         # Check if we have fdesc mounted          # Set fdesc_mounted=true if the fdesc file system is mounted
           # on the current directory (typically "/dev").
           # Later, this will be used to suppress creation of device nodes
           # that are supplied by the fdesc file system.
           #
           fdesc_mounted=false
         if [ -d fd ]; then          if [ -d fd ]; then
                 case "$(df fd)" in                  # Parse the output from "mount -u -o nosuchoption .".
                 *fdesc*)        nofdesc=false;;                  # We don't parse the output from df(1) because that's
                 *)              nofdesc=true;;                  # less likely to be available on install media.
                   #
                   # If the current directory is a mount point for the
                   # fdesc file system, then the expected output (whether
                   # or not the current user is root) is:
                   #       mount_fdesc: -o suchoption: option not supported.
                   #
                   # If the current directory is not a mount point, then
                   # the expected output is:
                   #       mount: .: unknown special file or file system.
                   #
                   # If we are not running on NetBSD, or mount(8) is not
                   # found, then we should get some other error message.
                   #
                   case "$({ LC_ALL=C mount -u -o nosuchoption . ; } 2>&1)" in
                   *mount_fdesc*)  fdesc_mounted=true ;;
                 esac                  esac
         else  
                 nofdesc=true  
         fi          fi
   
         # do_force requires mknod          # do_force requires mknod
Line 782  std)
Line 807  std)
         mkdev           zero    c %mem_chr% 12  666          mkdev           zero    c %mem_chr% 12  666
         mkdev           klog    c %log_chr% 0   600          mkdev           klog    c %log_chr% 0   600
         mkdev           ksyms   c %ksyms_chr% 0 444          mkdev           ksyms   c %ksyms_chr% 0 444
         if $nofdesc; then          if ! $fdesc_mounted; then
                 mkdev   tty     c %ctty_chr% 0          666                  mkdev   tty     c %ctty_chr% 0          666
                 mkdev   stdin   c %filedesc_chr% 0      666                  mkdev   stdin   c %filedesc_chr% 0      666
                 mkdev   stdout  c %filedesc_chr% 1      666                  mkdev   stdout  c %filedesc_chr% 1      666
Line 908  wskbd*)
Line 933  wskbd*)
         ;;          ;;
   
 fd)  fd)
         if $nofdesc; then          if ! $fdesc_mounted; then
                 makedir fd 755                  makedir fd 755
                 n=0                  n=0
                 while [ $n -lt 64 ]                  while [ $n -lt 64 ]

Legend:
Removed from v.1.118  
changed lines
  Added in v.1.119

CVSweb <webmaster@jp.NetBSD.org>