diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2019-08-10 21:35:39 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2019-08-10 21:35:39 +0200 |
commit | 14aa6eae52b8b9ae476ad2de13cb87f45e28f38b (patch) | |
tree | 6a8ca518ea1e43ed4127fd84645a84b51ba5a480 /gen_funcs.sh | |
parent | gen_funcs.sh: gen_die(): Call restore_boot_mount_state() (diff) | |
download | genkernel-14aa6eae52b8b9ae476ad2de13cb87f45e28f38b.tar.gz genkernel-14aa6eae52b8b9ae476ad2de13cb87f45e28f38b.tar.bz2 genkernel-14aa6eae52b8b9ae476ad2de13cb87f45e28f38b.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>
Diffstat (limited to 'gen_funcs.sh')
-rwxr-xr-x | gen_funcs.sh | 2 |
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 |