In the same vein of the grub path problem, nvsetenv's path
is hardcoded, while it doesn't need to. Fix that as well.

Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
---
 client/tools/boottool |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/client/tools/boottool b/client/tools/boottool
index 53f7d94..13ddd3a 100755
--- a/client/tools/boottool
+++ b/client/tools/boottool
@@ -1508,7 +1508,11 @@ class Grubby(object):
         '''
         Implements the boot once feature for the yaboot bootloader
         '''
-        return self._run_get_return(['/usr/sbin/nvsetenv',
+        nvsetenv_cmd = find_executable('nvsetenv')
+        if nvsetenv_cmd is None:
+            self.log.error("Could not find nvsetenv in PATH")
+            return -1
+        return self._run_get_return([nvsetenv_cmd,
                                      'boot-once',
                                      entry_title])
 
-- 
1.7.10.2

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to