ui/ncurses: Fix discover_client leak
[petitboot] / utils / pb-console
index e3bc8af14047b5872d8ad7f680e1521f289bd9ca..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,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