11.1Slukem#!/bin/sh 21.1Slukem# 31.15Ssborrill# $NetBSD: mountall,v 1.15 2021/03/09 12:42:46 sborrill 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.14Shannken zfs share -a 241.7Shaad fi 251.13Sroy 261.13Sroy # Mount file systems noted in fstab. 271.13Sroy mount -a 281.7Shaad} 291.7Shaad 301.7Shaadmountall_stop() 311.7Shaad{ 321.9Swiz echo 'Unmounting all file systems...' 331.13Sroy # Unmount file systems noted in fstab. 341.13Sroy umount -a 351.13Sroy 361.13Sroy # Unmount ZFS file systems. 371.12Sriastrad if checkyesno zfs; then 381.14Shannken zfs unshare -a 391.7Shaad zfs unmount -a 401.7Shaad fi 411.7Shaad} 421.1Slukem 431.3Slukemload_rc_config $name 441.15Ssborrillload_rc_config_var zfs zfs 451.1Slukemrun_rc_command "$1" 46