log: Allow runtime selection of 'debug' log level
[petitboot] / utils / pb-console
index d846ea7614703dd80f590f45a6f74341889dd773..9da899fdf7b242f4c47652cd0d753c0691445253 100644 (file)
@@ -96,9 +96,16 @@ do
        fi
 done
 
+verbose_opt=
+sysinfo_bin=$(dirname $0)/pb-sysinfo
+if [ -x $sysinfo_bin ] && $sysinfo_bin --debug-enabled
+then
+       verbose_opt=--verbose
+fi
+
 while :
 do
-       $ui
+       $ui $verbose_opt
        reset
        echo "Exiting petitboot. Type 'exit' to return."
        $shell