Changeset View
Changeset View
Standalone View
Standalone View
head/libexec/rc/rc.initdiskless
Show First 20 Lines • Show All 202 Lines • ▼ Show 20 Lines | handle_remount() { # $1 = mount point | ||||
chkerr $? "mount_nfs $nfspt $b" | chkerr $? "mount_nfs $nfspt $b" | ||||
to_umount="$b ${to_umount}" | to_umount="$b ${to_umount}" | ||||
} | } | ||||
# Create a generic memory disk. | # Create a generic memory disk. | ||||
# The 'auto' parameter will attempt to use tmpfs(5), falls back to md(4). | # The 'auto' parameter will attempt to use tmpfs(5), falls back to md(4). | ||||
# $1 is size in 512-byte sectors, $2 is the mount point. | # $1 is size in 512-byte sectors, $2 is the mount point. | ||||
mount_md() { | mount_md() { | ||||
if [ ${o_verbose} -gt 0 ] ; then | |||||
/sbin/mdmfs -XL -s $1 auto $2 | |||||
else | |||||
/sbin/mdmfs -s $1 auto $2 | /sbin/mdmfs -s $1 auto $2 | ||||
fi | |||||
} | } | ||||
# Create the memory filesystem if it has not already been created | # Create the memory filesystem if it has not already been created | ||||
# | # | ||||
create_md() { | create_md() { | ||||
[ "x`eval echo \\$md_created_$1`" = "x" ] || return # only once | [ "x`eval echo \\$md_created_$1`" = "x" ] || return # only once | ||||
if [ "x`eval echo \\$md_size_$1`" = "x" ]; then | if [ "x`eval echo \\$md_size_$1`" = "x" ]; then | ||||
md_size=10240 | md_size=10240 | ||||
▲ Show 20 Lines • Show All 181 Lines • Show Last 20 Lines |