diff options
author | slashdd <[email protected]> | 2016-09-20 13:07:58 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-09-20 10:07:58 -0700 |
commit | 792517389fad5c495a2738b61c2e9c65dedaaa9a (patch) | |
tree | 5eef2ac0ecc1db47b3f11ec4ba12a97b6427e1b7 /etc/init.d | |
parent | 25e2ab16be74cb37934e6736a1dc10fd50a00c56 (diff) |
Change /etc/mtab to /proc/self/mounts
Fix misleading error message:
"The /dev/zfs device is missing and must be created.", if /etc/mtab is missing.
Reviewed-by: Richard Laager <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Eric Desrochers <[email protected]>
Closes #4680
Closes #5029
Diffstat (limited to 'etc/init.d')
-rw-r--r-- | etc/init.d/zfs-functions.in | 2 | ||||
-rwxr-xr-x | etc/init.d/zfs-mount.in | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/etc/init.d/zfs-functions.in b/etc/init.d/zfs-functions.in index acfdf9926..97f2ea039 100644 --- a/etc/init.d/zfs-functions.in +++ b/etc/init.d/zfs-functions.in @@ -368,7 +368,7 @@ read_mtab() # Set the variable. eval export MTAB_$mntpnt=\"$fs\" fi - done < /proc/mounts + done < /proc/self/mounts } in_mtab() diff --git a/etc/init.d/zfs-mount.in b/etc/init.d/zfs-mount.in index 34db057c8..2722a31e4 100755 --- a/etc/init.d/zfs-mount.in +++ b/etc/init.d/zfs-mount.in @@ -39,7 +39,7 @@ chkroot() { if [ "$2" = "/" ]; then return 0 fi - done < /etc/mtab + done < /proc/self/mounts return 1 } @@ -178,7 +178,7 @@ do_start() check_module_loaded "zfs" || exit 0 - # Ensure / exists in /etc/mtab, if not update mtab accordingly. + # Ensure / exists in /proc/self/mounts. # This should be handled by rc.sysinit but lets be paranoid. if ! chkroot then |