packer: update VBoxGuestAdditions to v6.1.22 + Grml ISO to latest stable release...
[grml-debootstrap.git] / grml-debootstrap
index 6c0d625..1f4fa00 100755 (executable)
@@ -41,7 +41,7 @@ fi
 # variables {{{
 PN="$(basename "$0")"
 if [[ -d "$(dirname "$(command -v "$0")")"/.git ]]; then
-  VERSION="$(git describe | sed 's|^v||')"
+  VERSION="$(git --git-dir $(dirname "$(command -v "$0")")/.git describe | sed 's|^v||')"
 else
   VERSION="$(dpkg-query --show --showformat='${Version}' "$PN")"
 fi
@@ -996,9 +996,14 @@ format_efi_partition() {
 # check for EFI support or try to enable it {{{
 efi_support() {
   local efivars_loaded=false
+  # this is for kernels versions before v3.10, which didn't provide efivarfs yet
   if modprobe efivars &>/dev/null ; then
     efivars_loaded=true
   fi
+  # kernel versions v3.10 and newer usually provide efivarfs
+  if modprobe efivarfs &>/dev/null ; then
+    efivars_loaded=true
+  fi
 
   if [ -d /sys/firmware/efi ] ; then
     einfo "EFI support detected." ; eend 0
@@ -1541,8 +1546,11 @@ if [[ -z "${GRUB}" ]] || ! dd if="${GRUB}" bs=512 count=1 2>/dev/null | cat -v |
     f2fs)
       chroot "${MNTPOINT}" grub-mkimage -O i386-pc -p "(hd0,msdos1)/boot/grub" -o /tmp/core.img biosdisk part_msdos f2fs
       ;;
-      # NOTE - we might need to distinguish between further filesystems
-      *)
+    xfs)
+      chroot "${MNTPOINT}" grub-mkimage -O i386-pc -p "(hd0,msdos1)/boot/grub" -o /tmp/core.img biosdisk part_msdos xfs
+      ;;
+    # NOTE - we might need to distinguish between further filesystems
+    *)
       chroot "${MNTPOINT}" grub-mkimage -O i386-pc -p "(hd0,msdos1)/boot/grub" -o /tmp/core.img biosdisk part_msdos ext2
       ;;
   esac