Print this page
6198 Let's EOL cachefs


   7 # (the "License").  You may not use this file except in compliance
   8 # with the License.
   9 #
  10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  11 # or http://www.opensolaris.org/os/licensing.
  12 # See the License for the specific language governing permissions
  13 # and limitations under the License.
  14 #
  15 # When distributing Covered Code, include this CDDL HEADER in each
  16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  17 # If applicable, add the following below this CDDL HEADER, with the
  18 # fields enclosed by brackets "[]" replaced with your own identifying
  19 # information: Portions Copyright [yyyy] [name of copyright owner]
  20 #
  21 # CDDL HEADER END
  22 #
  23 
  24 #
  25 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  26 # Use is subject to license terms.

  27 #
  28 #       Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  29 #         All Rights Reserved
  30 #
  31 
  32 usage () {
  33         if [ -n "$1" ]; then
  34                 echo "mountall: $1" 1>&2
  35         fi
  36         echo "Usage:\nmountall [-F FSType] [-l|-r|-g] [file_system_table]" 1>&2
  37         exit 2
  38 }
  39 
  40 PATH=/usr/sbin:/usr/bin
  41 TYPES=all
  42 FSTAB=/etc/vfstab
  43 err=0
  44 
  45 # Clear these in case they were already set in our environment.
  46 FSType=


 392                 echo "fsckall failed with exit code "$?"."
 393                 checkmessage
 394                 ;;
 395         esac
 396 done
 397 
 398 if [ "$ALTM" ]; then
 399         if [ ! -f "$ALTM" ]; then
 400                 exit
 401         fi
 402         /sbin/sh $ALTM          # run the saved mount commands
 403         /usr/bin/rm -f $ALTM
 404         exit
 405 fi
 406 
 407 if [ -n "$FSType" ]; then
 408         /sbin/mount -a -F $FSType
 409         exit
 410 fi
 411 
 412 # Some remote filesystems (e.g. cachefs or autofs) shouldn't be be mounted
 413 # with mountall, so the list here is explicit (not from /etc/dfs/fstypes)
 414 if [ "$RFLAG" ]; then
 415         /sbin/mount -a -F nfs
 416         /sbin/mount -a -F smbfs
 417         exit
 418 fi
 419 
 420 if [ "$LFLAG" -o "$GFLAG" -o $err != 0 ]; then
 421         [ -z "$mntlist" ] || /sbin/mount -a $mntlist
 422         exit
 423 fi
 424 
 425 # else mount them all
 426 
 427 /sbin/mount -a


   7 # (the "License").  You may not use this file except in compliance
   8 # with the License.
   9 #
  10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  11 # or http://www.opensolaris.org/os/licensing.
  12 # See the License for the specific language governing permissions
  13 # and limitations under the License.
  14 #
  15 # When distributing Covered Code, include this CDDL HEADER in each
  16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  17 # If applicable, add the following below this CDDL HEADER, with the
  18 # fields enclosed by brackets "[]" replaced with your own identifying
  19 # information: Portions Copyright [yyyy] [name of copyright owner]
  20 #
  21 # CDDL HEADER END
  22 #
  23 
  24 #
  25 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  26 # Use is subject to license terms.
  27 # Copyright 2015 Nexenta Systems, Inc. All rights reserved.
  28 #
  29 #       Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  30 #         All Rights Reserved
  31 #
  32 
  33 usage () {
  34         if [ -n "$1" ]; then
  35                 echo "mountall: $1" 1>&2
  36         fi
  37         echo "Usage:\nmountall [-F FSType] [-l|-r|-g] [file_system_table]" 1>&2
  38         exit 2
  39 }
  40 
  41 PATH=/usr/sbin:/usr/bin
  42 TYPES=all
  43 FSTAB=/etc/vfstab
  44 err=0
  45 
  46 # Clear these in case they were already set in our environment.
  47 FSType=


 393                 echo "fsckall failed with exit code "$?"."
 394                 checkmessage
 395                 ;;
 396         esac
 397 done
 398 
 399 if [ "$ALTM" ]; then
 400         if [ ! -f "$ALTM" ]; then
 401                 exit
 402         fi
 403         /sbin/sh $ALTM          # run the saved mount commands
 404         /usr/bin/rm -f $ALTM
 405         exit
 406 fi
 407 
 408 if [ -n "$FSType" ]; then
 409         /sbin/mount -a -F $FSType
 410         exit
 411 fi
 412 
 413 # Some remote filesystems (e.g. autofs) shouldn't be mounted
 414 # with mountall, so the list here is explicit (not from /etc/dfs/fstypes)
 415 if [ "$RFLAG" ]; then
 416         /sbin/mount -a -F nfs
 417         /sbin/mount -a -F smbfs
 418         exit
 419 fi
 420 
 421 if [ "$LFLAG" -o "$GFLAG" -o $err != 0 ]; then
 422         [ -z "$mntlist" ] || /sbin/mount -a $mntlist
 423         exit
 424 fi
 425 
 426 # else mount them all
 427 
 428 /sbin/mount -a