]> git.ozlabs.org Git - yaboot.git/commitdiff
ybin userland interface for specifying bootonce
authorPaul Nasrat <pnasrat@redhat.com>
Thu, 19 Apr 2007 09:14:24 +0000 (10:14 +0100)
committerPaul Nasrat <pauln@enki.eridu>
Thu, 19 Apr 2007 09:14:24 +0000 (10:14 +0100)
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>

No differences found