aboutsummaryrefslogtreecommitdiffstats
path: root/systemd
diff options
context:
space:
mode:
authorVáclav Pavlín <vpavlin@redhat.com>2014-04-16 13:47:53 +0200
committerVáclav Pavlín <vpavlin@redhat.com>2014-04-16 13:49:33 +0200
commit32e8cbc1c91ada764ef4b5bb817b0c045d3fb3a4 (patch)
tree9a310b7b21005e8f6e712db7804c3c5fdcda3144 /systemd
parent12451218fbcb275ad23ef96ca60324810b53c474 (diff)
downloadinitscripts-32e8cbc1c91ada764ef4b5bb817b0c045d3fb3a4.tar
initscripts-32e8cbc1c91ada764ef4b5bb817b0c045d3fb3a4.tar.gz
initscripts-32e8cbc1c91ada764ef4b5bb817b0c045d3fb3a4.tar.bz2
initscripts-32e8cbc1c91ada764ef4b5bb817b0c045d3fb3a4.tar.xz
initscripts-32e8cbc1c91ada764ef4b5bb817b0c045d3fb3a4.zip
fedora-readonly: fix prefix detection (#1059749)
Diffstat (limited to 'systemd')
-rwxr-xr-xsystemd/fedora-readonly5
1 files changed, 3 insertions, 2 deletions
diff --git a/systemd/fedora-readonly b/systemd/fedora-readonly
index 190de26f..f33eef48 100755
--- a/systemd/fedora-readonly
+++ b/systemd/fedora-readonly
@@ -42,7 +42,8 @@ MOUNTS=()
if [ "$READONLY" = "yes" -o "$TEMPORARY_STATE" = "yes" ]; then
add_mount() {
- MOUNTS=("${MOUNTS[@]}" "$1")
+ mnt=${1%/}
+ MOUNTS=("${MOUNTS[@]}" "$mnt")
}
cp_empty() {
@@ -109,7 +110,7 @@ if [ "$READONLY" = "yes" -o "$TEMPORARY_STATE" = "yes" ]; then
prefix=0
for mount_point in "${MOUNTS[@]}"; do
[[ $m = $mount_point ]] && continue
- if [[ $m =~ ^$mount_point.* ]] ; then
+ if [[ $m =~ ^$mount_point/.* ]] ; then
prefix=1
break
fi