39 lines
737 B
Bash
Executable File
39 lines
737 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $NetBSD: mountall,v 1.11 2019/09/15 19:38:09 brad 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 && [ -x /sbin/zfs -a -f /etc/zfs/zpool.cache ]; then
|
|
# Mount ZFS file systems.
|
|
zfs mount -a
|
|
fi
|
|
}
|
|
|
|
mountall_stop()
|
|
{
|
|
echo 'Unmounting all file systems...'
|
|
if checkyesno zfs && [ -x /sbin/zfs -a -f /etc/zfs/zpool.cache ]; 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"
|