From b468f360fddf61af6d084a33ca9a2d5dd83608e9 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 19 Aug 2011 14:51:27 +0000 Subject: setup-lbu: filter out codepage mount option from fstab If the codepage option is there mount will fail. --- setup-lbu.in | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'setup-lbu.in') diff --git a/setup-lbu.in b/setup-lbu.in index edf5e76..1bd1b51 100755 --- a/setup-lbu.in +++ b/setup-lbu.in @@ -21,11 +21,16 @@ __EOF__ } get_mnt_line() { - mntpoint="$1" - mnttab="$2" - awk "\$2 == \"$mntpoint\" {print \$0}" "$mnttab" + local mntpoint="$1" + local mnttab="$2" + # 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() { test -n "$(get_mnt_line $1 /proc/mounts)" } -- cgit v1.2.3