If the getty arguments include '-a' do not set the '-l' option. This
implies the environment has been configured with users and will launch
the subsequent pb-console instance itself.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
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