Module Name: src
Committed By: roy
Date: Sun Mar 1 15:22:56 UTC 2020
Modified Files:
src/etc/rc.d: mountall
Log Message:
mountall: Mount ZFS filesystems before fstab
This allows null mounts in fstab to reference fstab mounts.
It's highly unlikely ZFS mounts would reference anything outside of ZFS.
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/etc/rc.d/mountall
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/etc/rc.d/mountall
diff -u src/etc/rc.d/mountall:1.12 src/etc/rc.d/mountall:1.13
--- src/etc/rc.d/mountall:1.12 Sun Feb 23 08:53:25 2020
+++ src/etc/rc.d/mountall Sun Mar 1 15:22:55 2020
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: mountall,v 1.12 2020/02/23 08:53:25 riastradh Exp $
+# $NetBSD: mountall,v 1.13 2020/03/01 15:22:55 roy Exp $
#
# REQUIRE: mountcritremote named ypbind
@@ -15,23 +15,27 @@ stop_cmd="mountall_stop"
mountall_start()
{
echo 'Mounting all file systems...'
- # Mount file systems noted in fstab.
- mount -a
+
+ # Mount ZFS filesystems first because fstab
+ # may try and null mount paths on ZFS.
if checkyesno zfs; then
- # Mount ZFS file systems.
zfs mount -a
fi
+
+ # Mount file systems noted in fstab.
+ mount -a
}
mountall_stop()
{
echo 'Unmounting all file systems...'
+ # Unmount file systems noted in fstab.
+ umount -a
+
+ # Unmount ZFS file systems.
if checkyesno zfs; then
- # Unmount ZFS file systems.
zfs unmount -a
fi
- # Unmount file systems noted in fstab.
- umount -a
}
load_rc_config $name