Date: Tuesday, January 3, 2012 @ 18:49:43
  Author: dreisner
Revision: 145905

refactor /boot-not-mounted detection to use util-linux tools

Modified:
  linux/trunk/linux.install

---------------+
 linux.install |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Modified: linux.install
===================================================================
--- linux.install       2012-01-03 23:21:58 UTC (rev 145904)
+++ linux.install       2012-01-03 23:49:43 UTC (rev 145905)
@@ -44,11 +44,9 @@
     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

Reply via email to