X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=utils%2Fpb-console;h=ef9ed0f61d455a8fc85757611d0dab374fa8e90c;hb=f110c98b582be12c9d4ac4a13a7bf5aff2b7dd57;hp=282fca1193604ff57b7aff102844648ecd4e5f70;hpb=a73d5c25b9de93289b620a54d2ab2c4b4634c793;p=petitboot diff --git a/utils/pb-console b/utils/pb-console index 282fca1..ef9ed0f 100644 --- a/utils/pb-console +++ b/utils/pb-console @@ -80,12 +80,24 @@ then then getty="$getty_arg" fi + + login_arg="-l$0" + for ttyarg in "$@" + do + # If the getty args include autologin don't override with -l + # and leave calling petitboot-nc to the user's init + if [ "$ttyarg" == "-a" ] + then + login_arg="" + fi + done + if [ "$detach" = 1 ] then - $getty -l $0 "$@" & + $getty $login_arg "$@" & exit else - exec $getty -l $0 "$@" + exec $getty $login_arg "$@" fi fi