From 782389f5183dff1a322b42173705cd004063f240 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 3 Jan 2012 23:49:43 +0000 Subject: [PATCH] refactor /boot-not-mounted detection to use util-linux tools --- linux.install | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/linux.install b/linux.install index cb44e4e..995fdca 100644 --- a/linux.install +++ b/linux.install @@ -44,11 +44,9 @@ post_upgrade() { echo ">>>" fi - if grep "^[^#]*[[:space:]]/boot" etc/fstab 2>&1 >/dev/null; then - if ! grep "[[:space:]]/boot" etc/mtab 2>&1 >/dev/null; then - echo "WARNING: /boot appears to be a separate partition but is not mounted." - echo " You probably just broke your system. Congratulations." - fi + if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then + echo "WARNING: /boot appears to be a separate partition but is not mounted." + echo " You probably just broke your system. Congratulations." fi # updating module dependencies