Commit b468f360 authored by Natanael Copa's avatar Natanael Copa

setup-lbu: filter out codepage mount option from fstab

If the codepage option is there mount will fail.
parent 3a7d91b3
...@@ -21,11 +21,16 @@ __EOF__ ...@@ -21,11 +21,16 @@ __EOF__
} }
get_mnt_line() { get_mnt_line() {
mntpoint="$1" local mntpoint="$1"
mnttab="$2" local mnttab="$2"
awk "\$2 == \"$mntpoint\" {print \$0}" "$mnttab" # we need filter out codepage=... in mount option as it makes
# mount fail if its there.
awk "\$2 == \"$mntpoint\" {
gsub(/,codepage=.*,/, ",", \$4);
print \$0;
}" "$mnttab"
} }
is_mounted() { is_mounted() {
test -n "$(get_mnt_line $1 /proc/mounts)" test -n "$(get_mnt_line $1 /proc/mounts)"
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment