[Rear-users] SF.net SVN: rear:[683] trunk/usr/share/rear/output/default/94_grub_rescue. sh

dag- at users.sourceforge.net dag- at users.sourceforge.net
Wed Jul 13 10:22:40 CEST 2011


Revision: 683
          http://rear.svn.sourceforge.net/rear/?rev=683&view=rev
Author:   dag-
Date:     2011-07-13 08:22:40 +0000 (Wed, 13 Jul 2011)

Log Message:
-----------
Calling grub --version syncs all disks, we hate this...

Modified Paths:
--------------
    trunk/usr/share/rear/output/default/94_grub_rescue.sh

Modified: trunk/usr/share/rear/output/default/94_grub_rescue.sh
===================================================================
--- trunk/usr/share/rear/output/default/94_grub_rescue.sh	2011-07-12 17:11:30 UTC (rev 682)
+++ trunk/usr/share/rear/output/default/94_grub_rescue.sh	2011-07-13 08:22:40 UTC (rev 683)
@@ -1,12 +1,21 @@
-# Add the rescue kernel and initrd to the local GRUB Legacy
+### Add the rescue kernel and initrd to the local GRUB Legacy
+###
 
-# Only do when explicitely enabled
+### Only do when explicitely enabled
 if [[ ! "$GRUB_RESCUE" =~ ^[yY1] ]]; then
     return
 fi
 
-# Only do when system has GRUB Legacy
-grub_version=$(get_version "grub --version")
+### Only do when system has GRUB Legacy
+grub_binary=$(get_path grub)
+if [[ -z "$grub_binary" ]]; then
+    Log "Could not find grub binary."
+    return
+fi
+
+### Use strings as grub --version syncs all disks
+#grub_version=$(get_version "grub --version")
+grub_version=$(get_version "strings $grub_binary")
 if version_newer "$grub_version" 1.0; then
     return
 fi


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rear-users mailing list