Skip to content

Commit

Permalink
mount-boot.eclass: Fix ro check
Browse files Browse the repository at this point in the history
Make sure we check only /boot mount and not any mount
containing '/boot'.

Closes: https://bugs.gentoo.org/691874
Signed-off-by: Thomas Deutschmann <[email protected]>
  • Loading branch information
Whissi committed Aug 12, 2019
1 parent e41b34d commit 7840e73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eclass/mount-boot.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ mount-boot_check_status() {
# note that /dev/BOOT is in the Gentoo default /etc/fstab file
local fstabstate=$(awk '!/^#|^[[:blank:]]+#|^\/dev\/BOOT/ {print $2}' /etc/fstab | egrep "^/boot$" )
local procstate=$(awk '$2 ~ /^\/boot$/ {print $2}' /proc/mounts)
local proc_ro=$(awk '{ print $2 " ," $4 "," }' /proc/mounts | sed -n '/\/boot .*,ro,/p')
local proc_ro=$(awk '{ print $2 " ," $4 "," }' /proc/mounts | sed -n '/^\/boot .*,ro,/p')

if [ -n "${fstabstate}" ] && [ -n "${procstate}" ] ; then
if [ -n "${proc_ro}" ] ; then
Expand Down

0 comments on commit 7840e73

Please sign in to comment.