fs-minimal revision d1419d5a02eaedd520f925cd465fd62f3950ae43
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# CDDL HEADER START
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# The contents of this file are subject to the terms of the
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# Common Development and Distribution License (the "License").
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# You may not use this file except in compliance with the License.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# See the License for the specific language governing permissions
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# and limitations under the License.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# When distributing Covered Code, include this CDDL HEADER in each
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# If applicable, add the following below this CDDL HEADER, with the
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# fields enclosed by brackets "[]" replaced with your own identifying
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# CDDL HEADER END
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# Use is subject to license terms.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# All rights reserved.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# Mount other file systems to be available in single user mode.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# Currently, these are /var, /var/adm, /var/run and /tmp. A change
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# here will require a modification to the following programs (and
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# documentation): /sbin/mountall, /sbin/umountall, and
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync if [ -n "$mountp" ]; then
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync mounted $mountp $mntopts $fstype < /etc/mnttab && continue
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync checkfs $fsckdev $fstype $mountp || exit $SMF_EXIT_ERR_FATAL
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync mountpt=`zfs get -H -o value mountpoint $be$fs 2>/dev/null`
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync if [ $? = 0 ] ; then
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncif [ $? != 0 ] ; then
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync mountfs -O /var/run tmpfs - swap || exit $SMF_EXIT_ERR_FATAL
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync /sbin/zfs list -rH -o mountpoint -s mountpoint -t filesystem $be | \
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync while read mountp ; do
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync if [ "x$mountp" != "x" -a "$mountp" != "legacy" ] ; then