22 lines
871 B
Diff
22 lines
871 B
Diff
|
diff -up yaboot-1.3.14/ybin/ybin.fix-bootonce-nvram yaboot-1.3.14/ybin/ybin
|
||
|
--- yaboot-1.3.14/ybin/ybin.fix-bootonce-nvram 2008-11-12 14:51:28.000000000 -0500
|
||
|
+++ yaboot-1.3.14/ybin/ybin 2008-11-13 12:15:21.000000000 -0500
|
||
|
@@ -1689,14 +1689,15 @@ checkconf || exit 1
|
||
|
|
||
|
if [ "x$bootonce" != "x" ]; then
|
||
|
foundlabel=`sed s/\#.*// $bootconf | grep "label=$bootonce$" | wc -l`
|
||
|
- if [ "$nonvram" = 0 ]; then
|
||
|
+ if [ "$nonvram" = 1 ]; then
|
||
|
echo 1>&2 "$PRG: --bootonce specified, but nvsetenv not available."
|
||
|
exit 1
|
||
|
fi
|
||
|
if [ "$foundlabel" = 1 ]; then
|
||
|
nvsetenv boot-once "$bootonce"
|
||
|
foundlabel=`nvsetenv boot-once`
|
||
|
- if [ "$foundlabel" != "boot-once=$bootonce" ]; then
|
||
|
+ if [ "$foundlabel" != "boot-once=$bootonce" -a \
|
||
|
+ "$foundlabel" != "$bootonce" ]; then
|
||
|
echo 1>&2 "$PRG: Could not nvsetenv boot-once $bootonce"
|
||
|
exit 1
|
||
|
fi
|