[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[patch 4/4] elilo multiboot support (new-kernel-pkg)



This patch allows new-kernel-pkg to call grubby with multiboot
arguments for elilo.  Additionally it fixes multiple /sbin/grubby
instances to use the variable from the top of the script.

Signed-off-by: Aron Griffis <aron hp com>

 new-kernel-pkg |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

--- new-kernel-pkg.0	Mon Jun 05 14:04:27 2006 -0400
+++ new-kernel-pkg	Wed Jun 07 16:41:34 2006 -0400
@@ -125,7 +125,7 @@ install() {
 	fi
     fi
 
-    if [ -n "$mbkernel" ]; then
+    if [ -n "$mbkernel" -a -n "$cfgLilo" -a "$liloFlag" != "elilo" ]; then
 	[ -n "$verbose" ] && echo "multiboot specified, not updating lilo.conf"
 	cfgLilo=""
     fi
@@ -140,7 +140,7 @@ install() {
 	else
 	    title="Red Hat Linux ($version)"
 	fi
-	/sbin/grubby --add-kernel=$bootPrefix/$kernelName-$version \
+	$grubby --add-kernel=$bootPrefix/$kernelName-$version \
 	    $INITRD --copy-default $makedefault --title "$title" \
 	    ${mbkernel:+--add-multiboot="$mbkernel"} ${mbargs:+--mbargs="$mbargs"} \
 	    --args="root=$rootdevice $kernargs" --remove-kernel="TITLE=$title"
@@ -151,11 +151,11 @@ install() {
     if [ -n "$cfgLilo" ]; then
 	[ -n "$verbose" ] && echo "adding $version to $liloConfig"
 
-	/sbin/grubby --add-kernel=$bootPrefix/$kernelName-$version $INITRD    \
-		     --copy-default $makedefault --title $version	    \
-		     --args="root=$rootdevice $kernargs"			    \
-		     --remove-kernel="TITLE=$version"		    \
-		     --$liloFlag
+	$grubby --add-kernel=$bootPrefix/$kernelName-$version $INITRD 
+		--copy-default $makedefault --title $version \
+		${mbkernel:+--add-multiboot="$mbkernel"} ${mbargs:+--mbargs="$mbargs"} \
+		--args="root=$rootdevice $kernargs" --remove-kernel="TITLE=$version" \
+		--$liloFlag
 
 	if [ -n "$runLilo" ]; then 
 	    [ -n "$verbose" ] && echo "running $lilo"
@@ -181,14 +181,14 @@ remove() {
 
     if [ -n "$cfgGrub" ]; then
 	[ -n "$verbose" ] && echo "removing $version from $grubConfig"
-	/sbin/grubby --remove-kernel=$bootPrefix/$kernelName-$version
+	$grubby --remove-kernel=$bootPrefix/$kernelName-$version
     else
 	[ -n "$verbose" ] && echo "$grubConfig does not exist, not running grubby"
     fi
 
     if [ -n "$cfgLilo" ]; then
 	[ -n "$verbose" ] && echo "removing $version from $liloConfig"
-	/sbin/grubby --remove-kernel=$bootPrefix/$kernelName-$version	    \
+	$grubby --remove-kernel=$bootPrefix/$kernelName-$version	    \
 		     --$liloFlag
 
 	if [ -n "$runLilo" ]; then 
@@ -207,7 +207,7 @@ update() {
 update() {
     if [ -n "$cfgGrub" ]; then
 	[ -n "$verbose" ] && echo "updating $version from $grubConfig"
-	/sbin/grubby --update-kernel=$bootPrefix/$kernelName-$version \
+	$grubby --update-kernel=$bootPrefix/$kernelName-$version \
 	    ${kernargs:+--args="$kernargs"} \
 	    ${removeargs:+--remove-args="$removeargs"}	
     else
@@ -216,7 +216,7 @@ update() {
 
     if [ -n "$cfgLilo" ]; then
 	[ -n "$verbose" ] && echo "updating $version from $liloConfig"
-	/sbin/grubby --update-kernel=$bootPrefix/$kernelName-$version \
+	$grubby --update-kernel=$bootPrefix/$kernelName-$version \
 	    ${kernargs:+--args="$kernargs"} \
 	    ${removeargs:+--remove-args="$removeargs"}	\
 		     --$liloFlag


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]