Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/genkernel:master commit in: /
Date: Sat, 10 Aug 2019 19:38:01
Message-Id: 1565465739.14aa6eae52b8b9ae476ad2de13cb87f45e28f38b.whissi@gentoo
1 commit: 14aa6eae52b8b9ae476ad2de13cb87f45e28f38b
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 10 19:35:39 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 10 19:35:39 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=14aa6eae
7
8 gen_funcs.sh: make_bootdir_writable(): Fix ro check
9
10 Make sure we check $BOOTDIR only for ro and not any mount containing
11 $BOOTDIR value.
12
13 Bug: https://bugs.gentoo.org/691872
14 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
15
16 gen_funcs.sh | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19 diff --git a/gen_funcs.sh b/gen_funcs.sh
20 index 3c9c56f..da9bc08 100755
21 --- a/gen_funcs.sh
22 +++ b/gen_funcs.sh
23 @@ -1746,7 +1746,7 @@ make_bootdir_writable() {
24 # Based on mount-boot.eclass code
25 local fstabstate=$(awk "!/^#|^[[:blank:]]+#|^${BOOTDIR//\//\\/}/ {print \$2}" /etc/fstab 2>/dev/null | egrep "^${BOOTDIR}$" )
26 local procstate=$(awk "\$2 ~ /^${BOOTDIR//\//\\/}\$/ {print \$2}" /proc/mounts 2>/dev/null)
27 - local proc_ro=$(awk '{ print $2 " ," $4 "," }' /proc/mounts 2>/dev/null | sed -n "/${BOOTDIR//\//\\/} .*,ro,/p")
28 + local proc_ro=$(awk '{ print $2 " ," $4 "," }' /proc/mounts 2>/dev/null | sed -n "/^${BOOTDIR//\//\\/} .*,ro,/p")
29
30 if [ -n "${fstabstate}" ] && [ -n "${procstate}" ]
31 then