aboutsummaryrefslogtreecommitdiffstats
path: root/systemd
diff options
context:
space:
mode:
authorVáclav Pavlín <vpavlin@redhat.com>2014-04-16 13:47:53 +0200
committerLukas Nykryn <lnykryn@redhat.com>2014-07-24 13:55:43 +0200
commitbdfa5a5d4e959937fe9f525d8ce39cec410dbe08 (patch)
tree33c10f2696ff778b9e5390e4bb29576999615f3f /systemd
parent22115405ab3f578500884de21f4bb9ebf80dbc62 (diff)
downloadinitscripts-bdfa5a5d4e959937fe9f525d8ce39cec410dbe08.tar
initscripts-bdfa5a5d4e959937fe9f525d8ce39cec410dbe08.tar.gz
initscripts-bdfa5a5d4e959937fe9f525d8ce39cec410dbe08.tar.bz2
initscripts-bdfa5a5d4e959937fe9f525d8ce39cec410dbe08.tar.xz
initscripts-bdfa5a5d4e959937fe9f525d8ce39cec410dbe08.zip
fedora-readonly: fix prefix detection (#1059749)
Diffstat (limited to 'systemd')
-rwxr-xr-xsystemd/rhel-readonly5
1 files changed, 3 insertions, 2 deletions
diff --git a/systemd/rhel-readonly b/systemd/rhel-readonly
index 190de26f..f33eef48 100755
--- a/systemd/rhel-readonly
+++ b/systemd/rhel-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