diff --git a/pkg/getty/etc/profile.d/namespace.sh b/pkg/getty/etc/profile.d/namespace.sh deleted file mode 100644 index db350f3fa..000000000 --- a/pkg/getty/etc/profile.d/namespace.sh +++ /dev/null @@ -1 +0,0 @@ -export PS1="(ns: getty) $PS1" diff --git a/pkg/getty/usr/bin/rungetty.sh b/pkg/getty/usr/bin/rungetty.sh index 8cb89e877..68262087e 100755 --- a/pkg/getty/usr/bin/rungetty.sh +++ b/pkg/getty/usr/bin/rungetty.sh @@ -41,6 +41,14 @@ start_getty() { infinite_loop setsid.getty -w /sbin/agetty $loginargs $line $speed $tty $term & } + +# check if we are namespaced, and, if so, indicate in the PS1 +if [ -z "$INIGETTY" ]; then + cat >/etc/profile.d/namespace.sh <<"EOF" +export PS1="(ns: getty) $PS1" +EOF +fi + # check if we have /etc/getty.shadow ROOTSHADOW=/hostroot/etc/getty.shadow if [ -f $ROOTSHADOW ]; then