[Fai-commit] r5201 - people/michael/experimental/patches

mt at alioth.debian.org mt at alioth.debian.org
Thu Oct 16 18:19:01 UTC 2008


Author: mt
Date: 2008-10-16 18:19:01 +0000 (Thu, 16 Oct 2008)
New Revision: 5201

Added:
   people/michael/experimental/patches/grub-pc
   people/michael/experimental/patches/setup-storage_command-dep-bugfix
Modified:
   people/michael/experimental/patches/series
Log:
- added very first experimental patch to make use of grub-pc via GRUB_PC class
- added patch to fix bug #502462


Added: people/michael/experimental/patches/grub-pc
===================================================================
--- people/michael/experimental/patches/grub-pc	                        (rev 0)
+++ people/michael/experimental/patches/grub-pc	2008-10-16 18:19:01 UTC (rev 5201)
@@ -0,0 +1,66 @@
+2008-10-16  Michael Tautschnig  <mt at debian.org>
+
+	* simple example: Added class GRUB_PC that installs and uses grub-pc instead
+		of grub, following the suggestions of Jean Spirat <jeanspirat at squirk.org>.
+		This is untested.
+	* Makefile: Make sure that all example scripts are executable
+Index: trunk/Makefile
+===================================================================
+--- trunk.orig/Makefile
++++ trunk/Makefile	
+@@ -45,6 +45,7 @@
+ 	install -p -m644 pixmaps/*.gif $(DESTDIR)/usr/share/fai/pixmaps
+ 	perl -pi -e 's/FAIVERSIONSTRING/$(VERSIONSTRING)/' $(DESTDIR)/usr/sbin/fai
+ 	cp -a examples $(DOCDIR)
++	chmod -R a+x $(DOCDIR)/examples/simple/scripts/
+ 	cp -a utils $(DOCDIR)/examples
+ 
+ .PHONY: clean veryclean
+Index: trunk/examples/simple/package_config/DEFAULT
+===================================================================
+--- trunk.orig/examples/simple/package_config/DEFAULT
++++ trunk/examples/simple/package_config/DEFAULT	
+@@ -14,7 +14,10 @@
+ dhcp3-client
+ 
+ PACKAGES aptitude GRUB
+-grub lilo-
++grub lilo- grub-pc-
+ 
+ PACKAGES aptitude LILO
+-lilo grub-
++lilo grub- grub-pc-
++
++PACKAGES aptitude GRUB
++grub-pc grub- lilo-
+Index: trunk/examples/simple/scripts/GRUB_PC/10-setup
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ trunk/examples/simple/scripts/GRUB_PC/10-setup	
+@@ -0,0 +1,26 @@
++#! /bin/bash
++
++error=0 ; trap "error=$((error|1))" ERR
++
++set -a
++
++# during softupdate use this file
++[ -r $LOGDIR/disk_var.sh ] && . $LOGDIR/disk_var.sh
++
++# if class NOMBR is defined, write boot loader into root partition, not into mbr
++ifclass NOMBR && BOOT_DEVICE=$BOOT_PARTITION
++
++[ -z "$BOOT_DEVICE" ]    && exit 701
++[ -z "$BOOT_PARTITION" ] && exit 702
++
++$ROOTCMD grub-mkimage --output=/boot/grub/core.img ext2 pc gpt biosdisk lvm
++grub_dev=$(device2grub $BOOT_DEVICE)
++if [ -z "$grub_dev" ] ; then
++  grub_dev=$(echo $BOOT_DEVICE | sed 's#^/dev/##')
++fi
++$ROOTCMD /usr/sbin/grub-install "($grub_dev)"
++$ROOTCMD /usr/sbin/grub-setup   "($grub_dev)"
++$ROOTCMD /usr/sbin/update-grub
++
++exit $error
++

Modified: people/michael/experimental/patches/series
===================================================================
--- people/michael/experimental/patches/series	2008-10-16 10:17:21 UTC (rev 5200)
+++ people/michael/experimental/patches/series	2008-10-16 18:19:01 UTC (rev 5201)
@@ -1,3 +1,4 @@
+setup-storage_command-dep-bugfix
 setup-storage_udevsettle
 setup-storage_large-partition-check
 setup-storage_opt-d
@@ -7,3 +8,4 @@
 bugfix-464541
 setup-storage_liblinux-lvm
 setup-storage_disk-id-support
+grub-pc

Added: people/michael/experimental/patches/setup-storage_command-dep-bugfix
===================================================================
--- people/michael/experimental/patches/setup-storage_command-dep-bugfix	                        (rev 0)
+++ people/michael/experimental/patches/setup-storage_command-dep-bugfix	2008-10-16 18:19:01 UTC (rev 5201)
@@ -0,0 +1,20 @@
+2008-10-16  Michael Tautschnig  <mt at debian.org>
+
+	* lib/setup-storage/Commands.pm: fixed dependency error in vgcreate commands
+		(closes: #502462)
+Index: trunk/lib/setup-storage/Commands.pm
+===================================================================
+--- trunk.orig/lib/setup-storage/Commands.pm
++++ trunk/lib/setup-storage/Commands.pm	
+@@ -292,9 +292,9 @@
+       "pv_done_$_" ) foreach (@devices);
+     # create the volume group
+     my $pre_dev = "";
+-    $pre_dev .= ",pv_done_$_" foreach (@devices);
++    $pre_dev .= ",exist_$_,pv_done_$_" foreach (@devices);
+     $pre_dev =~ s/^,//;
+-    &FAI::push_command( "vgcreate $vg " . join (" ", @devices), "exist_$pre_dev",
++    &FAI::push_command( "vgcreate $vg " . join (" ", @devices), "$pre_dev",
+       "vg_created_$vg" );
+     # we are done
+     return;




More information about the Fai-commit mailing list