mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 19:04:45 +03:00
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 <rlaager@wiktel.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com> Closes #4680 Closes #5029
This commit is contained in:
committed by
Brian Behlendorf
parent
25e2ab16be
commit
792517389f
@@ -368,7 +368,7 @@ read_mtab()
|
||||
# Set the variable.
|
||||
eval export MTAB_$mntpnt=\"$fs\"
|
||||
fi
|
||||
done < /proc/mounts
|
||||
done < /proc/self/mounts
|
||||
}
|
||||
|
||||
in_mtab()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user