diff options
author | Václav Pavlín <vpavlin@redhat.com> | 2014-04-16 13:47:53 +0200 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2014-07-24 13:55:43 +0200 |
commit | bdfa5a5d4e959937fe9f525d8ce39cec410dbe08 (patch) | |
tree | 33c10f2696ff778b9e5390e4bb29576999615f3f /systemd | |
parent | 22115405ab3f578500884de21f4bb9ebf80dbc62 (diff) | |
download | initscripts-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-x | systemd/rhel-readonly | 5 |
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 |