aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2019-08-10 21:35:39 +0200
committerThomas Deutschmann <whissi@gentoo.org>2019-08-10 21:35:39 +0200
commit14aa6eae52b8b9ae476ad2de13cb87f45e28f38b (patch)
tree6a8ca518ea1e43ed4127fd84645a84b51ba5a480
parentgen_funcs.sh: gen_die(): Call restore_boot_mount_state() (diff)
downloadgenkernel-14aa6eae.tar.gz
genkernel-14aa6eae.tar.bz2
genkernel-14aa6eae.zip
gen_funcs.sh: make_bootdir_writable(): Fix ro check
Make sure we check $BOOTDIR only for ro and not any mount containing $BOOTDIR value. Bug: https://bugs.gentoo.org/691872 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
-rwxr-xr-xgen_funcs.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/gen_funcs.sh b/gen_funcs.sh
index 3c9c56f..da9bc08 100755
--- a/gen_funcs.sh
+++ b/gen_funcs.sh
@@ -1746,7 +1746,7 @@ make_bootdir_writable() {
# Based on mount-boot.eclass code
local fstabstate=$(awk "!/^#|^[[:blank:]]+#|^${BOOTDIR//\//\\/}/ {print \$2}" /etc/fstab 2>/dev/null | egrep "^${BOOTDIR}$" )
local procstate=$(awk "\$2 ~ /^${BOOTDIR//\//\\/}\$/ {print \$2}" /proc/mounts 2>/dev/null)
- local proc_ro=$(awk '{ print $2 " ," $4 "," }' /proc/mounts 2>/dev/null | sed -n "/${BOOTDIR//\//\\/} .*,ro,/p")
+ local proc_ro=$(awk '{ print $2 " ," $4 "," }' /proc/mounts 2>/dev/null | sed -n "/^${BOOTDIR//\//\\/} .*,ro,/p")
if [ -n "${fstabstate}" ] && [ -n "${procstate}" ]
then