summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsetup-lbu.in13
1 files changed, 9 insertions, 4 deletions
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)"
}