NetBSD/etc/rc.d/mountall

46 lines
765 B
Plaintext
Raw Normal View History

2000-03-10 14:53:23 +03:00
#!/bin/sh
#
# $NetBSD: mountall,v 1.15 2021/03/09 12:42:46 sborrill Exp $
2000-03-10 14:53:23 +03:00
#
# REQUIRE: mountcritremote named ypbind
2000-03-10 14:53:23 +03:00
# PROVIDE: mountall
$_rc_subr_loaded . /etc/rc.subr
2000-03-10 14:53:23 +03:00
name="mountall"
start_cmd="mountall_start"
stop_cmd="mountall_stop"
mountall_start()
{
echo 'Mounting all file systems...'
# Mount ZFS filesystems first because fstab
# may try and null mount paths on ZFS.
if checkyesno zfs; then
zfs mount -a
zfs share -a
fi
# Mount file systems noted in fstab.
mount -a
}
mountall_stop()
{
echo 'Unmounting all file systems...'
# Unmount file systems noted in fstab.
umount -a
# Unmount ZFS file systems.
if checkyesno zfs; then
zfs unshare -a
zfs unmount -a
fi
}
2000-03-10 14:53:23 +03:00
load_rc_config $name
load_rc_config_var zfs zfs
2000-03-10 14:53:23 +03:00
run_rc_command "$1"