| 1 |
2009-04-29 Michael Tautschnig <mt@debian.org>
|
| 2 |
|
| 3 |
* simple example: Added class GRUB_PC that installs and uses grub-pc instead
|
| 4 |
of grub, following the suggestions of Jean Spirat <jeanspirat@squirk.org>.
|
| 5 |
* Makefile: Make sure that all example scripts are executable
|
| 6 |
Index: trunk/Makefile
|
| 7 |
===================================================================
|
| 8 |
--- trunk.orig/Makefile
|
| 9 |
+++ trunk/Makefile
|
| 10 |
@@ -45,6 +45,7 @@
|
| 11 |
install -p -m644 pixmaps/*.gif $(DESTDIR)/usr/share/fai/pixmaps
|
| 12 |
perl -pi -e 's/FAIVERSIONSTRING/$(VERSIONSTRING)/' $(DESTDIR)/usr/sbin/fai
|
| 13 |
cp -a examples $(DOCDIR)
|
| 14 |
+ chmod -R a+x $(DOCDIR)/examples/simple/scripts/
|
| 15 |
cp -a utils $(DOCDIR)/examples
|
| 16 |
|
| 17 |
.PHONY: clean veryclean
|
| 18 |
Index: trunk/examples/simple/package_config/DEFAULT
|
| 19 |
===================================================================
|
| 20 |
--- trunk.orig/examples/simple/package_config/DEFAULT
|
| 21 |
+++ trunk/examples/simple/package_config/DEFAULT
|
| 22 |
@@ -17,7 +17,10 @@
|
| 23 |
dhcp3-client
|
| 24 |
|
| 25 |
PACKAGES aptitude GRUB
|
| 26 |
-grub lilo-
|
| 27 |
+grub lilo- grub-pc-
|
| 28 |
|
| 29 |
PACKAGES aptitude LILO
|
| 30 |
-lilo grub-
|
| 31 |
+lilo grub- grub-pc-
|
| 32 |
+
|
| 33 |
+PACKAGES aptitude GRUB
|
| 34 |
+grub-pc grub- lilo-
|
| 35 |
Index: trunk/examples/simple/scripts/GRUB_PC/10-setup
|
| 36 |
===================================================================
|
| 37 |
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
| 38 |
+++ trunk/examples/simple/scripts/GRUB_PC/10-setup
|
| 39 |
@@ -0,0 +1,26 @@
|
| 40 |
+#! /bin/bash
|
| 41 |
+
|
| 42 |
+error=0 ; trap "error=$((error|1))" ERR
|
| 43 |
+
|
| 44 |
+set -a
|
| 45 |
+
|
| 46 |
+# during softupdate use this file
|
| 47 |
+[ -r $LOGDIR/disk_var.sh ] && . $LOGDIR/disk_var.sh
|
| 48 |
+
|
| 49 |
+# if class NOMBR is defined, write boot loader into root partition, not into mbr
|
| 50 |
+ifclass NOMBR && BOOT_DEVICE=$BOOT_PARTITION
|
| 51 |
+
|
| 52 |
+[ -z "$BOOT_DEVICE" ] && exit 701
|
| 53 |
+[ -z "$BOOT_PARTITION" ] && exit 702
|
| 54 |
+
|
| 55 |
+$ROOTCMD grub-mkimage --output=/boot/grub/core.img ext2 pc gpt biosdisk lvm
|
| 56 |
+grub_dev=$(device2grub $BOOT_DEVICE)
|
| 57 |
+if [ -z "$grub_dev" ] ; then
|
| 58 |
+ grub_dev=$(echo $BOOT_DEVICE | sed 's#^/dev/##')
|
| 59 |
+fi
|
| 60 |
+$ROOTCMD /usr/sbin/grub-install --modules="ext2 _chain pc gpt biosdisk lvm raid serial" "($grub_dev)"
|
| 61 |
+$ROOTCMD /usr/sbin/grub-setup "($grub_dev)"
|
| 62 |
+$ROOTCMD /usr/sbin/update-grub
|
| 63 |
+
|
| 64 |
+exit $error
|
| 65 |
+
|