patch to fail more gracefuly when nvsetenv doesn't work
Could someone test this on an OpenFirmware machine for which nvsetenv works?
The idea is that for those machines in which nvsetenv isn't usable, at least user gets to know what command to type.
Signature · 4 lines
Robert Millan My spam trap is [email protected]. Note: this address is only intended for spam harvesters. Writing to it will get you added to my black list.
util/powerpc/ieee1275/grub-install.in +4 -2
@@ -180,9 +180,11 @@ } # Point boot-device at the new grub install - "$nvsetenv" boot-device "$ofpath:$partno,"'\grub' || { + boot_device="boot-device $ofpath:$partno,\\grub" + "$nvsetenv" "$boot_device" || { echo "$nvsetenv failed." - echo "You will have to set boot-device manually." + echo "You will have to set boot-device manually. At the OpenFirmware prompt, type:" + echo " ok setenv $boot_device" exit 1 } fi
Quoted 33 lines · Robert Millan
Could someone test this on an OpenFirmware machine for which nvsetenv works?
The idea is that for those machines in which nvsetenv isn't usable, at least
user gets to know what command to type.Signature · 18 lines
Robert Millan My spam trap is [email protected]. Note: this address is only intended for spam harvesters. Writing to it will get you added to my black list. text/x-diff attachment (nvsetenv.diff) diff -ur grub2-1.95+20070626.old/util/powerpc/ieee1275/grub-install.in grub2-1.95+20070626/util/powerpc/ieee1275/grub-install.inutil/powerpc/ieee1275/grub-install.in 2007-06-29 20:51:41.000000000 +0200 renamed from util/powerpc/ieee1275/grub-install.in 2007-05-05 13:55:20.000000000 +0200 +0
-0@@ -180,9 +180,11 @@ } # Point boot-device at the new grub install
util/powerpc/ieee1275/grub-install.in 2007-06-29 20:51:41.000000000 +0200 line 190
Quoted 10 lines
util/powerpc/ieee1275/grub-install.in 2007-06-29 20:51:41.000000000 +0200 renamed from util/powerpc/ieee1275/grub-install.in 2007-05-05 13:55:20.000000000 +0200 +4
-2- "$nvsetenv" boot-device "$ofpath:$partno,"'\grub' || { + boot_device="boot-device $ofpath:$partno,\\grub" + "$nvsetenv" "$boot_device" || { echo "$nvsetenv failed." - echo "You will have to set boot-device manually." + echo "You will have to set boot-device manually. At the OpenFirmware prompt, type:" + echo " ok setenv $boot_device" exit 1 } fi
I would omit the " ok " here, since the user should not type that. Also, the name is "Open Firmware", not "OpenFirmware".
-Hollis