Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc/rc.d mountall: Mount ZFS filesystems before fstab
details: https://anonhg.NetBSD.org/src/rev/b4aa89a2e3e1
branches: trunk
changeset: 849419:b4aa89a2e3e1
user: roy <roy%NetBSD.org@localhost>
date: Sun Mar 01 15:22:55 2020 +0000
description:
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.
diffstat:
etc/rc.d/mountall | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diffs (46 lines):
diff -r 6d8b1c991cb9 -r b4aa89a2e3e1 etc/rc.d/mountall
--- a/etc/rc.d/mountall Sun Mar 01 15:18:34 2020 +0000
+++ b/etc/rc.d/mountall Sun Mar 01 15:22:55 2020 +0000
@@ -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 @@
mountall_start()
{
echo 'Mounting all file systems...'
+
+ # Mount ZFS filesystems first because fstab
+ # may try and null mount paths on ZFS.
+ if checkyesno zfs; then
+ zfs mount -a
+ fi
+
# Mount file systems noted in fstab.
mount -a
- if checkyesno zfs; then
- # Mount ZFS file systems.
- zfs mount -a
- fi
}
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
Home |
Main Index |
Thread Index |
Old Index