mountall revision 1.13
11.1Slukem#!/bin/sh
21.1Slukem#
31.13Sroy# $NetBSD: mountall,v 1.13 2020/03/01 15:22:55 roy Exp $
41.1Slukem#
51.1Slukem
61.6Stsutsui# REQUIRE: mountcritremote named ypbind
71.1Slukem# PROVIDE: mountall
81.1Slukem
91.4Smycroft$_rc_subr_loaded . /etc/rc.subr
101.1Slukem
111.1Slukemname="mountall"
121.7Shaadstart_cmd="mountall_start"
131.7Shaadstop_cmd="mountall_stop"
141.7Shaad
151.7Shaadmountall_start()
161.7Shaad{
171.9Swiz	echo 'Mounting all file systems...'
181.13Sroy
191.13Sroy	# Mount ZFS filesystems first because fstab
201.13Sroy	# may try and null mount paths on ZFS.
211.12Sriastrad	if checkyesno zfs; then
221.7Shaad		zfs mount -a
231.7Shaad	fi
241.13Sroy
251.13Sroy	# Mount file systems noted in fstab.
261.13Sroy	mount -a
271.7Shaad}
281.7Shaad
291.7Shaadmountall_stop()
301.7Shaad{
311.9Swiz	echo 'Unmounting all file systems...'
321.13Sroy	# Unmount file systems noted in fstab.
331.13Sroy	umount -a
341.13Sroy
351.13Sroy	# Unmount ZFS file systems.
361.12Sriastrad	if checkyesno zfs; then
371.7Shaad		zfs unmount -a
381.7Shaad	fi
391.7Shaad}
401.1Slukem
411.3Slukemload_rc_config $name
421.1Slukemrun_rc_command "$1"
43