]> git.gag.com Git - debian/elilo/blobdiff - debian/elilo.sh
Imported Debian patch 3.6-1
[debian/elilo] / debian / elilo.sh
index 17368e679592c2ba5f49616874157921df7b91ed..df78c64eed2a2a38f7c7a6236306da5360098a95 100644 (file)
@@ -38,6 +38,8 @@ TARGET=
 EFIROOT=/EFI/debian
 export LC_COLLATE=C
 
+ARCHITECTURE=$(dpkg --print-installation-architecture)
+
 ## catch signals, clean up junk in /tmp.
 trap "cleanup" 0
 trap "cleanup; exit 129" HUP
@@ -283,6 +285,11 @@ checkconf()
        CONFERR=1
     fi
 
+    # efibootmgr needs efivars, make sure kernel module is loaded
+    if modprobe -q efivars ; then
+        echo "Loaded efivars kernel module to enable use of efibootmgr"
+    fi
+
     if [ ! -d /proc/efi/vars ] && [ ! -d /sys/firmware/efi/vars ] && [ "$efiboot" = 1 ] ; then
        echo 1>&2 "$PRG: no efi/vars under /proc or /sys/firmware, boot menu not updated"
        efiboot=0
@@ -524,9 +531,8 @@ delay=$timeout
 default=$label
 " > "$TMPCONF" || return 1
 
-if [ -d /proc/sgi_sn ]
+if [ "$ARCHITECTURE" = "ia64" ]
 then
-  # aha!  This is an SGI Altix, and they need the relocatable option.
   echo "relocatable" >> "$TMPCONF" || return 1
 fi