Home | History | Annotate | Line # | Download | only in rc.d
mountall revision 1.10.4.3
      1 #!/bin/sh
      2 #
      3 # $NetBSD: mountall,v 1.10.4.3 2021/03/09 16:01:24 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; 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; 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 load_rc_config_var zfs zfs
     39 run_rc_command "$1"
     40