[Ovirt-devel] [PATCH node-image] improve boot menu configuration

Alan Pevec apevec at redhat.com
Wed Jan 28 22:09:55 UTC 2009


fix parsing and add option for custom default boot parameters

Signed-off-by: Alan Pevec <apevec at redhat.com>
---
 ovirt-node-image.ks |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/ovirt-node-image.ks b/ovirt-node-image.ks
index 376acc9..f96fb38 100644
--- a/ovirt-node-image.ks
+++ b/ovirt-node-image.ks
@@ -57,11 +57,19 @@ echo "Fixing boot menu"
 # remove quiet from Node bootparams, added by livecd-creator
 sed -i -e 's/ quiet//' $LIVE_ROOT/isolinux/isolinux.cfg
 
-# add standalone boot entry
+# add stand-alone boot entry
 awk '
-/label linux0/ { linux0=1 }
-linux0=1 && /append / { append0=$0 }
-/label check0/ {
+BEGIN {
+  # append additional default boot parameters
+  add_boot_params=""
+}
+/^label linux0/ { linux0=1 }
+linux0==1 && $1=="append" {
+  $0=$0 " " add_boot_params
+  append0=$0
+}
+linux0==1 && $1=="label" && $2!="linux0" {
+  linux0=2
   print "label stand-alone"
   print "  menu label Boot in stand-alone mode"
   print "  kernel vmlinuz0"
-- 
1.6.0.6




More information about the ovirt-devel mailing list