[debian-lan-devel] [debian-lan] 02/02: Merge FAI 4.2.2 modifications.

Andreas B. Mundt andi at moszumanska.debian.org
Thu Aug 7 15:47:17 UTC 2014


This is an automated email from the git hooks/post-receive script.

andi pushed a commit to branch master
in repository debian-lan.

commit f4b531576c46f31c73d940a06f363649ebfe0655
Author: Andreas B. Mundt <andi at debian.org>
Date:   Thu Aug 7 15:42:05 2014 +0200

    Merge FAI 4.2.2 modifications.
---
 fai/config/hooks/savelog.LAST.source |  2 ++
 fai/config/scripts/GRUB_PC/10-setup  | 30 +++++++++++++-----------------
 2 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/fai/config/hooks/savelog.LAST.source b/fai/config/hooks/savelog.LAST.source
index 07b9d5a..6a11dbb 100755
--- a/fai/config/hooks/savelog.LAST.source
+++ b/fai/config/hooks/savelog.LAST.source
@@ -51,6 +51,8 @@ kernel-patch-badram
 kolab-webadmin
 kolabadmin
 gstreamer0.10-plugins-really-bad
+plugins-bad-free
+liberrors.so
 gsambad
 libad
 libtest-nowarnings-perl
diff --git a/fai/config/scripts/GRUB_PC/10-setup b/fai/config/scripts/GRUB_PC/10-setup
index a4f393e..055fcaf 100755
--- a/fai/config/scripts/GRUB_PC/10-setup
+++ b/fai/config/scripts/GRUB_PC/10-setup
@@ -3,22 +3,17 @@
 
 error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
 
-## Skip if not installing:
-if [ "$FAI_ACTION" != "install" ] ; then
-    exit 0
-fi
-
 set -a
 # during softupdate use this file
 [ -r $LOGDIR/disk_var.sh ] && . $LOGDIR/disk_var.sh
 
 [ -z "$BOOT_DEVICE" ]    && exit 701
 
-$ROOTCMD grub-mkdevicemap --no-floppy
-GROOT=$($ROOTCMD grub-probe -tdrive -d $BOOT_DEVICE)
-$ROOTCMD grub-install --no-floppy "$GROOT"
-if [ $? -eq 0 ]; then
-    echo "Grub installed on $BOOT_DEVICE = $GROOT"
+$ROOTCMD update-grub
+
+# skip the rest, if not an initial installation
+if [ $FAI_ACTION != "install" ]; then
+    exit $error
 fi
 
 # check if mdadm has been forgotten
@@ -28,21 +23,22 @@ if grep -q active /proc/mdstat 2>/dev/null; then
     fi
 fi
 
-$ROOTCMD update-grub
-
-# skip the rest, if not an initial installation
-if [ $FAI_ACTION != "install" ]; then
-    exit $error
-fi
+$ROOTCMD grub-mkdevicemap --no-floppy
+GROOT=$($ROOTCMD grub-probe -tdrive -d $BOOT_DEVICE)
 
 # Check if RAID is used for the boot device
 if [[ $BOOT_DEVICE =~ '/dev/md' ]]; then
     raiddev=${BOOT_DEVICE#/dev/}
     # install grub on all members of RAID
-    for device in `perl -ne 'if(/^'$raiddev'\s.+raid\d+\s(.+)/){ $_=$1; s/\d+\[\d+\]//g; print }' /proc/mdstat`; do
+    for device in `LC_ALL=C perl -ne 'if(/^'$raiddev'\s.+raid\d+\s(.+)/){ $_=$1; s/\d+\[\d+\]//g; print }' /proc/mdstat`; do
 	echo Install grub on /dev/$device
 	$ROOTCMD grub-install --no-floppy "/dev/$device"
     done
+else
+    $ROOTCMD grub-install --no-floppy "$GROOT"
+    if [ $? -eq 0 ]; then
+        echo "Grub installed on $BOOT_DEVICE = $GROOT"
+    fi
 fi
 
 exit $error

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/debian-lan.git



More information about the debian-lan-devel mailing list