From: Paul Nasrat Date: Thu, 19 Apr 2007 09:14:24 +0000 (+0100) Subject: ybin userland interface for specifying bootonce X-Git-Tag: yaboot-1.3.14rc2~9 X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=commitdiff_plain;h=a5b19d45fb5569f68e56445536296188b2ec0809;hp=a5b19d45fb5569f68e56445536296188b2ec0809 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 ---