39 lines
649 B
Bash
Executable File
39 lines
649 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $NetBSD: mountall,v 1.10.4.2 2020/02/25 20:03:12 martin Exp $
|
|
#
|
|
|
|
# REQUIRE: mountcritremote named ypbind
|
|
# PROVIDE: mountall
|
|
|
|
$_rc_subr_loaded . /etc/rc.subr
|
|
|
|
name="mountall"
|
|
start_cmd="mountall_start"
|
|
stop_cmd="mountall_stop"
|
|
|
|
mountall_start()
|
|
{
|
|
echo 'Mounting all file systems...'
|
|
# Mount file systems noted in fstab.
|
|
mount -a
|
|
if checkyesno zfs; then
|
|
# Mount ZFS file systems.
|
|
zfs mount -a
|
|
fi
|
|
}
|
|
|
|
mountall_stop()
|
|
{
|
|
echo 'Unmounting all file systems...'
|
|
if checkyesno zfs; then
|
|
# Unmount ZFS file systems.
|
|
zfs unmount -a
|
|
fi
|
|
# Unmount file systems noted in fstab.
|
|
umount -a
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|