summaryrefslogtreecommitdiff
path: root/setup-lbu.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-08-19 14:51:27 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-08-19 14:51:27 +0000
commitb468f360fddf61af6d084a33ca9a2d5dd83608e9 (patch)
tree1dd23d141579554be60adbf7c5c4914ef6f18dd2 /setup-lbu.in
parent3a7d91b32171a6c80ae26f199355d0f7db95eb7f (diff)
downloadalpine-conf-b468f360fddf61af6d084a33ca9a2d5dd83608e9.zip
setup-lbu: filter out codepage mount option from fstab
If the codepage option is there mount will fail.
Diffstat (limited to 'setup-lbu.in')
-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)"
}