mountall revision 1.11
1#!/bin/sh
2#
3# $NetBSD: mountall,v 1.11 2019/09/15 19:38:09 brad Exp $
4#
5
6# REQUIRE: mountcritremote named ypbind
7# PROVIDE: mountall
8
9$_rc_subr_loaded . /etc/rc.subr
10
11name="mountall"
12start_cmd="mountall_start"
13stop_cmd="mountall_stop"
14
15mountall_start()
16{
17	echo 'Mounting all file systems...'
18	# Mount file systems noted in fstab.
19	mount -a
20	if checkyesno zfs && [ -x /sbin/zfs -a -f /etc/zfs/zpool.cache ]; then
21		# Mount ZFS file systems.
22		zfs mount -a
23	fi
24}
25
26mountall_stop()
27{
28	echo 'Unmounting all file systems...'
29	if checkyesno zfs && [ -x /sbin/zfs -a -f /etc/zfs/zpool.cache ]; then
30		# Unmount ZFS file systems.
31		zfs unmount -a
32	fi
33	# Unmount file systems noted in fstab.
34	umount -a
35}
36
37load_rc_config $name
38run_rc_command "$1"
39