ybin userland interface for specifying bootonce

Add an option to ybin called "--bootonce" that takes exactly one
argument, the label of the kernel to boot exactly once, on next reboot.

Do some sanity checking.  Grep through the yaboot config file to make
sure that label=WHATEVER exists somewhere, bail if not.  Try to prune
out comment lines.  Perhaps this might be implemented better.  It worked
will in my testing, though.

Set the boot-once OF environment variable to the --bootonce value.  Due
to the previously mentioned nvsetenv bug, this will fail silently if
you're trying to set boot-once on a system where boot-once doesn't
already exist in nvram.  Thus, immediately after doing the set, try and
read it back out of nvsetenv and make sure it landed there.  Bail if
not.

Signed-off-by: Dustin Kirkland <dustin.kirkland@us.ibm.com>
1 file changed