From 66d26269a83229b7340f7ace06dfc715c04df7d8 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Thu, 12 Sep 2019 12:32:36 +0200 Subject: Repalace hardcoded tests for yes and no with testing functions Resolve issue: #42 --- usr/libexec/readonly-root | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr') diff --git a/usr/libexec/readonly-root b/usr/libexec/readonly-root index a3679580..9b9c2824 100755 --- a/usr/libexec/readonly-root +++ b/usr/libexec/readonly-root @@ -43,7 +43,7 @@ if strstr "$cmdline" noreadonlyroot ; then fi MOUNTS=() -if [ "$READONLY" = "yes" -o "$TEMPORARY_STATE" = "yes" ]; then +if is_true "$READONLY" || is_true "$TEMPORARY_STATE"; then add_mount() { mnt=${1%/} @@ -80,7 +80,7 @@ if [ "$READONLY" = "yes" -o "$TEMPORARY_STATE" = "yes" ]; then rw_mount_dev=$(blkid -t LABEL="$RW_LABEL" -l -o device) bindmountopts= - [ "$SLAVE_MOUNTS" = "yes" ] && bindmountopts="--make-slave" + is_true "$SLAVE_MOUNTS" && bindmountopts="--make-slave" # First try to mount scratch storage from /etc/fstab, then any # partition with the proper label. If either succeeds, be sure -- cgit v1.2.1