projects
/
grml-live.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
94a9b17
)
Check if the appropiate grub packages are installed in GRMLBASE/45-grub-images and...
mru/relax-grub-gen
author
Ulrich Dangel
<mru@grml.org>
Sun, 11 Mar 2012 15:11:54 +0000
(16:11 +0100)
committer
Ulrich Dangel
<mru@grml.org>
Sun, 11 Mar 2012 15:11:54 +0000
(16:11 +0100)
etc/grml/fai/config/scripts/GRMLBASE/45-grub-images
patch
|
blob
|
history
diff --git
a/etc/grml/fai/config/scripts/GRMLBASE/45-grub-images
b/etc/grml/fai/config/scripts/GRMLBASE/45-grub-images
index
d6fdb5c
..
5aace74
100755
(executable)
--- a/
etc/grml/fai/config/scripts/GRMLBASE/45-grub-images
+++ b/
etc/grml/fai/config/scripts/GRMLBASE/45-grub-images
@@
-29,10
+29,14
@@
BOOTX64="${BOOTX64##${target}}"
EFI_IMG="${EFI_IMG##${target}}"
TMP_CONFIG="${TMP_CONFIG##${target}}"
EFI_IMG="${EFI_IMG##${target}}"
TMP_CONFIG="${TMP_CONFIG##${target}}"
-ARCHS=(i386-pc)
declare -A ADDITIONAL_MODULES
declare -A ADDITIONAL_MODULES
-ADDITIONAL_MODULES[i386-pc]="biosdisk"
+ARCHS=()
+
+if [ -r "${target}"/usr/lib/grub/i386-pc/moddep.lst ] ; then
+ ARCHS+=(i386-pc)
+ ADDITIONAL_MODULES[i386-pc]="biosdisk"
+fi
if ifclass AMD64 ; then
if [ -r "${target}"/usr/lib/grub/x86_64-efi/moddep.lst ] ; then
if ifclass AMD64 ; then
if [ -r "${target}"/usr/lib/grub/x86_64-efi/moddep.lst ] ; then
@@
-48,6
+52,12
@@
BOOTX64="${BOOTX64##${target}}"
EFI_IMG="${EFI_IMG##${target}}"
TMP_CONFIG="${TMP_CONFIG##${target}}"
EFI_IMG="${EFI_IMG##${target}}"
TMP_CONFIG="${TMP_CONFIG##${target}}"
+
+if [ -z "$ARCHS" ] ; then
+ echo "WARNING: No grub modules found, exiting" >&2
+ exit 0
+fi
+
for arch in ${ARCHS[@]} ; do
$ROOTCMD grub-mkimage -O $arch -o /boot/$arch.img --prefix=/boot/grub/ --config="$TMP_CONFIG" \
bitmap boot btrfs cat chain cmp configfile cpio echo elf ext2 \
for arch in ${ARCHS[@]} ; do
$ROOTCMD grub-mkimage -O $arch -o /boot/$arch.img --prefix=/boot/grub/ --config="$TMP_CONFIG" \
bitmap boot btrfs cat chain cmp configfile cpio echo elf ext2 \
@@
-68,7
+78,7
@@
fi
if ifclass AMD64 ; then
if ! [ -r "${target}/${BOOTX64}" ] ; then
echo "Can not access grub efi image." >&2
if ifclass AMD64 ; then
if ! [ -r "${target}/${BOOTX64}" ] ; then
echo "Can not access grub efi image." >&2
- exit
1
+ exit
0
fi
SIZE=$(du -sk "${target}/${BOOTX64}" | awk -F" " '{print $1'})
fi
SIZE=$(du -sk "${target}/${BOOTX64}" | awk -F" " '{print $1'})