diff --git a/pkg/getty/etc/init.d/001-getty b/pkg/getty/etc/init.d/001-getty index a36c70590..46205b2e9 100755 --- a/pkg/getty/etc/init.d/001-getty +++ b/pkg/getty/etc/init.d/001-getty @@ -2,4 +2,6 @@ # if we are here, then we need to debug a linuxkit build # so we always run in INSECURE mode -INSECURE=true /usr/bin/rungetty.sh +export INITGETTY=true +export INSECURE=true +/usr/bin/rungetty.sh diff --git a/pkg/getty/usr/bin/rungetty.sh b/pkg/getty/usr/bin/rungetty.sh index e8ae401f5..8cb89e877 100755 --- a/pkg/getty/usr/bin/rungetty.sh +++ b/pkg/getty/usr/bin/rungetty.sh @@ -56,5 +56,5 @@ for opt in $(cat /proc/cmdline); do esac done -# wait for all our child process to exit; tini will handle subreaping, if necessary -wait +# if we are in a container (not in root init) wait for all our child process to exit; tini will handle subreaping, if necessary +[ -z "$INITGETTY" ] && wait