1 #!/bin/sh 2 # 3 # $NetBSD: mountall,v 1.10.4.1 2019/09/27 09:18:37 martin Exp $ 4 # 5 6 # REQUIRE: mountcritremote named ypbind 7 # PROVIDE: mountall 8 9 $_rc_subr_loaded . /etc/rc.subr 10 11 name="mountall" 12 start_cmd="mountall_start" 13 stop_cmd="mountall_stop" 14 15 mountall_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 26 mountall_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 37 load_rc_config $name 38 run_rc_command "$1" 39