File lilo.ppc.nvram-fix.patch of Package lilo

diff -Nur lilo.ppc.old/lilo-chrp.lib lilo.ppc/lilo-chrp.lib
--- lilo.ppc.old/lilo-chrp.lib	2008-11-05 13:54:13.000000000 +0100
+++ lilo.ppc/lilo-chrp.lib	2011-02-11 14:01:35.000000000 +0100
@@ -649,7 +649,10 @@
 		fi
 
 		if (( fat_boot == 1 )); then
-			nvsetenv bootinfo-linux "${boot_path},\\ppc\\bootinfo.txt"
+			#don't set bootinfo-linux
+			#as for fat partitions it not needed
+			#even we have no file there
+			#nvram --update-config bootinfo-linux="${boot_path},\\ppc\\bootinfo.txt"
 			boot_path=${boot_path},yaboot
 		elif [[ "${p_flags[*]}" != *type=41*type=41* ]]; then
 			# open firmware is confused about more than one PReP partition, in that
@@ -660,14 +663,14 @@
 		if [ "$OPTION_ACTIVATE" = "yes" ] ; then
 			echo "Prepending  '$boot_path'" to open firmware variable boot-device
 
-			local -a bootdevice=( $(nvsetenv boot-device) )
+			local -a bootdevice=( $(nvram --print-config=boot-device) )
 			bootdevice[0]=${bootdevice[0]#boot-device=}
 			for (( i=${#bootdevice[*]}; i-- >0; )); do
 				if [[ "${bootdevice[$i]}" == ${boot_path}* ]]; then
 					unset bootdevice[$i];
 				fi
 			done
-			nvsetenv boot-device "$boot_path ${bootdevice[*]}"
+			nvram --update-config boot-device="$boot_path ${bootdevice[*]}"
 
 		else
 			warning "boot path not set to boot linux as requested" \
diff -Nur lilo.ppc.old/lilo-pmac.lib lilo.ppc/lilo-pmac.lib
--- lilo.ppc.old/lilo-pmac.lib	2008-11-05 13:54:13.000000000 +0100
+++ lilo.ppc/lilo-pmac.lib	2011-02-11 14:01:51.000000000 +0100
@@ -381,7 +381,7 @@
 	if [ "$OPTION_ACTIVATE" = "yes" ] ; then
 		NV_BOOT_PATH=$(get_of_path $OPTION_BOOT)
 		echo set OF boot-device $NV_BOOT_PATH",\\\\:tbxi"
-		nvsetenv boot-device $NV_BOOT_PATH",\\\\:tbxi"
+		nvram --update-config boot-device=$NV_BOOT_PATH",\\\\:tbxi"
 	fi
 }
 
openSUSE Build Service is sponsored by