blob: cc5dbe7ed2a58de22add5139c8b646e82c1f51ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#!/bin/sh
#
# $NetBSD: mountall,v 1.15 2021/03/09 12:42:46 sborrill 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 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
}
load_rc_config $name
load_rc_config_var zfs zfs
run_rc_command "$1"
|