diff options
author | Turbo Fredriksson <[email protected]> | 2015-06-19 16:22:14 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-06-25 11:56:47 -0700 |
commit | 16421a1dc837eae4cc0b353e7f6616bc6202c013 (patch) | |
tree | 22711b41ec44d18954d6ca47bf8b2b634ec6edb1 /etc/init.d/zfs-mount.in | |
parent | 216f9d04a651a6b692de9933cc37ee238267a617 (diff) |
Additional SYSV init script fixes (3).
* In read_mtab(), fix problems (!?) in the mounts file. It will record
'rpool 1' as 'rpool\0401' instead of 'rpool\00401' which seems to be the
correct (at least as far as 'printf' is concerned). Use this using the
external 'echo' command (and not the one built in to the shell) because
the internal one would interpret the backslash code (incorrectly), giving
us a instead.
* Remove reregister_mounts() - no longer needed.
* For Gentoo, the zfs_log_failure_msg() should use eend(), not eerror()
(which requires an error message, which we don't have).
Signed-off-by: Turbo Fredriksson <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #3488
Closes #3509
Closes #3514
Diffstat (limited to 'etc/init.d/zfs-mount.in')
-rwxr-xr-x | etc/init.d/zfs-mount.in | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/etc/init.d/zfs-mount.in b/etc/init.d/zfs-mount.in index 50a0aef04..e26813d90 100755 --- a/etc/init.d/zfs-mount.in +++ b/etc/init.d/zfs-mount.in @@ -165,15 +165,11 @@ do_start() { check_module_loaded || exit 0 - # fix mtab to include already-mounted fs filesystems, in case there are any - # we ONLY do this if mtab does not point to /proc/mounts - # which is the case in some systems (systemd may bring that soon) - if ! readlink /etc/mtab | grep -q /proc ; then - if grep -qE "(^/dev/zd|^/dev/zvol| zfs )" /proc/mounts ; then - zfs_action "Registering already-mounted ZFS filesystems and volumes" \ - reregister_mounts - fi - fi + case "$ZFS_MOUNT" in + [Oo][Ff][Ff]|[Nn][Oo]|''|0) + exit 3 + ;; + esac # Ensure / exists in /etc/mtab, if not update mtab accordingly. # This should be handled by rc.sysinit but lets be paranoid. @@ -182,12 +178,6 @@ do_start() mount -f / fi - case "$ZFS_MOUNT" in - [Oo][Ff][Ff]|[Nn][Oo]|''|0) - exit 3 - ;; - esac - do_mount } |