mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 11:19:32 +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
db58aa717b
commit
dcaa460d6d
@ -366,10 +366,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