ui/ncurses: Fix discover_client leak
[petitboot] / utils / pb-console
index b1c8003ef841d155b81051a9dc091beec83ff7d0..9da899fdf7b242f4c47652cd0d753c0691445253 100644 (file)
@@ -82,6 +82,7 @@ then
        if [ "$detach" = 1 ]
        then
                $getty -l $0 "$@" &
+               exit
        else
                exec $getty -l $0 "$@"
        fi
@@ -95,9 +96,17 @@ 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
 done