mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
zfs-functions.in: in_mtab() always returns 1
$fs used with the wrong sed command where should be $mntpnt instead to match a variable exported by read_mtab() The fix is mostly to reuse the sed command found in read_mtab() Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de> Signed-off-by: Alexey Smirnoff <fling@member.fsf.org> Closes #9168
This commit is contained in:
parent
325d288c5d
commit
c759b33a51
@ -373,10 +373,13 @@ read_mtab()
|
||||
|
||||
in_mtab()
|
||||
{
|
||||
local fs="$(echo "$1" | sed 's,/,_,g')"
|
||||
local mntpnt="$1"
|
||||
# Remove 'unwanted' characters.
|
||||
mntpnt=$(printf '%b\n' "$mntpnt" | sed -e 's,/,,g' \
|
||||
-e 's,-,,g' -e 's,\.,,g' -e 's, ,,g')
|
||||
local var
|
||||
|
||||
var="$(eval echo MTAB_$fs)"
|
||||
var="$(eval echo MTAB_$mntpnt)"
|
||||
[ "$(eval echo "$""$var")" != "" ]
|
||||
return "$?"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user