summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/svc/milestone/fs-root28
-rw-r--r--usr/src/cmd/svc/milestone/fs-usr43
2 files changed, 21 insertions, 50 deletions
diff --git a/usr/src/cmd/svc/milestone/fs-root b/usr/src/cmd/svc/milestone/fs-root
index c61ec92b48..9652eaaf94 100644
--- a/usr/src/cmd/svc/milestone/fs-root
+++ b/usr/src/cmd/svc/milestone/fs-root
@@ -21,6 +21,7 @@
#
#
# Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
#
# Make sure that the libraries essential to this stage of booting can be found.
@@ -74,32 +75,7 @@ fi
#
readvfstab "/usr" < $vfstab
if [ -n "$mountp" ]; then
- if [ "$fstype" = cachefs ]; then
- #
- # Mount without the cache initially. We'll enable it
- # later at remount time. This lets us avoid
- # teaching the statically linked mount program about
- # cachefs. Here we determine the backfstype.
- # This is not pretty, but we have no tools for parsing
- # the option string until we get /usr mounted...
- #
- case "$mntopts" in
- *backfstype=nfs*)
- cfsbacktype=nfs
- ;;
- *backfstype=hsfs*)
- cfsbacktype=hsfs
- ;;
- *)
- msg='invalid vfstab entry for /usr'
- echo $msg
- echo "$SMF_FMRI:" $msg >/dev/msglog
- cfsbacktype=nfs
- ;;
- esac
- mountfs - /usr $cfsbacktype ro $special ||
- exit $SMF_EXIT_ERR_FATAL
- elif [ "$fstype" = zfs ]; then
+ if [ "$fstype" = zfs ]; then
mountfs - /usr $fstype $mntopts - || exit $SMF_EXIT_ERR_FATAL
else
#
diff --git a/usr/src/cmd/svc/milestone/fs-usr b/usr/src/cmd/svc/milestone/fs-usr
index b9e643c151..cf8ce047fe 100644
--- a/usr/src/cmd/svc/milestone/fs-usr
+++ b/usr/src/cmd/svc/milestone/fs-usr
@@ -24,7 +24,7 @@
#
# Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T.
# All rights reserved.
-#
+# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
#
. /lib/svc/share/smf_include.sh
. /lib/svc/share/fs_include.sh
@@ -112,31 +112,26 @@ fi
if [ "$rootiszfs" = 0 ] ; then
readvfstab /usr < $vfstab
if [ "$mountp" ]; then
- if [ "$fstype" = cachefs ]; then
- mountfs -O $mountp cachefs $mntopts $special ||
+ checkopt ro $mntopts
+ if [ "x$option" != xro ]; then
+ checkfs $fsckdev $fstype $mountp ||
exit $SMF_EXIT_ERR_FATAL
- else
- checkopt ro $mntopts
- if [ "x$option" != xro ]; then
- checkfs $fsckdev $fstype $mountp ||
- exit $SMF_EXIT_ERR_FATAL
- if [ "x$mntopts" != x- ]; then
- mntopts="remount,$mntopts"
- else
- mntopts="remount"
- fi
-
- # if usr dev is a read-only metadevice then fail
- case $special in
- /dev/md/dsk/*)
- dd if=/dev/null of=$special count=0 \
- >/dev/null 2>&1 || exit $SMF_EXIT_ERR_FATAL
- ;;
- esac
-
- mountfs - /usr $fstype $mntopts - ||
- exit $SMF_EXIT_ERR_FATAL
+ if [ "x$mntopts" != x- ]; then
+ mntopts="remount,$mntopts"
+ else
+ mntopts="remount"
fi
+
+ # if usr dev is a read-only metadevice then fail
+ case $special in
+ /dev/md/dsk/*)
+ dd if=/dev/null of=$special count=0 \
+ >/dev/null 2>&1 || exit $SMF_EXIT_ERR_FATAL
+ ;;
+ esac
+
+ mountfs - /usr $fstype $mntopts - ||
+ exit $SMF_EXIT_ERR_FATAL
fi
fi
fi