Print this page
6197 get rid of unused checks in fs-root and fs-usr boot scripts

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/svc/milestone/fs-root
          +++ new/usr/src/cmd/svc/milestone/fs-root
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14  # When distributing Covered Code, include this CDDL HEADER in each
  15   15  # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16   16  # If applicable, add the following below this CDDL HEADER, with the
  17   17  # fields enclosed by brackets "[]" replaced with your own identifying
  18   18  # information: Portions Copyright [yyyy] [name of copyright owner]
  19   19  #
  20   20  # CDDL HEADER END
  21   21  #
  22   22  #
  23   23  # Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
       24 +# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
  24   25  #
  25   26  
  26   27  # Make sure that the libraries essential to this stage of booting can be found.
  27   28  LD_LIBRARY_PATH=/lib; export LD_LIBRARY_PATH
  28   29  
  29   30  libc_mount() {
  30   31          #
  31   32          # If there is an optimized libc available in /usr that fits this
  32   33          # processor, mount it on top of the base libc.
  33   34          #
↓ open down ↓ 33 lines elided ↑ open up ↑
  67   68  # Root is already mounted (by the kernel), but still needs to be
  68   69  # checked, possibly remounted and entered into mnttab.  First
  69   70  # mount /usr if it is a separate file system.  If the file system
  70   71  # type is something other than zfs, mount it read-only.  This must
  71   72  # be done first to allow utilities such as fsck and setmnt to
  72   73  # reside on /usr minimizing the space required by the root file
  73   74  # system.
  74   75  #
  75   76  readvfstab "/usr" < $vfstab
  76   77  if [ -n "$mountp" ]; then
  77      -        if [ "$fstype" = cachefs ]; then
  78      -                #
  79      -                # Mount without the cache initially.  We'll enable it
  80      -                # later at remount time.  This lets us avoid
  81      -                # teaching the statically linked mount program about
  82      -                # cachefs.  Here we determine the backfstype.
  83      -                # This is not pretty, but we have no tools for parsing
  84      -                # the option string until we get /usr mounted...
  85      -                #
  86      -                case "$mntopts" in
  87      -                *backfstype=nfs*)
  88      -                        cfsbacktype=nfs
  89      -                        ;;
  90      -                *backfstype=hsfs*)
  91      -                        cfsbacktype=hsfs
  92      -                        ;;
  93      -                *)
  94      -                        msg='invalid vfstab entry for /usr'
  95      -                        echo $msg
  96      -                        echo "$SMF_FMRI:" $msg >/dev/msglog
  97      -                        cfsbacktype=nfs
  98      -                        ;;
  99      -                esac
 100      -                mountfs - /usr $cfsbacktype ro $special ||
 101      -                    exit $SMF_EXIT_ERR_FATAL
 102      -        elif [ "$fstype" = zfs ]; then
       78 +        if [ "$fstype" = zfs ]; then
 103   79                  mountfs - /usr $fstype $mntopts - || exit $SMF_EXIT_ERR_FATAL
 104   80          else
 105   81                  #
 106   82                  # Must use -o largefiles here to ensure the
 107   83                  # read-only mount does not fail as a result of
 108   84                  # having a large file present on /usr. This gives
 109   85                  # fsck a chance to fix up the largefiles flag
 110   86                  # before we remount /usr read-write.
 111   87                  #
 112   88                  if [ "x$mntopts" = x- ]; then
↓ open down ↓ 75 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX