diff --git a/blueprints/docker-for-mac/base.yml b/blueprints/docker-for-mac/base.yml index 98ec7be50..6434712c0 100644 --- a/blueprints/docker-for-mac/base.yml +++ b/blueprints/docker-for-mac/base.yml @@ -53,7 +53,7 @@ services: image: linuxkit/acpid:1966310cb75e28ffc668863a6577ee991327f918 # Enable getty for easier debugging - name: getty - image: linuxkit/getty:894eef1e5f62f3bc31de8ffaff2b6c0e093c4595 + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 env: - INSECURE=true # Run ntpd to keep time synchronised in the VM diff --git a/examples/docker.yml b/examples/docker.yml index 7c3ce7d7e..83fda7c77 100644 --- a/examples/docker.yml +++ b/examples/docker.yml @@ -20,7 +20,7 @@ onboot: command: ["/usr/bin/mountie", "/var/lib/docker"] services: - name: getty - image: linuxkit/getty:894eef1e5f62f3bc31de8ffaff2b6c0e093c4595 + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 env: - INSECURE=true - name: rngd diff --git a/examples/gcp.yml b/examples/gcp.yml index ec18c0fca..cd64df298 100644 --- a/examples/gcp.yml +++ b/examples/gcp.yml @@ -16,7 +16,7 @@ onboot: image: linuxkit/metadata:f5d4299909b159db35f72547e4ae70bd76c42c6c services: - name: getty - image: linuxkit/getty:894eef1e5f62f3bc31de8ffaff2b6c0e093c4595 + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 env: - INSECURE=true - name: rngd diff --git a/examples/getty.yml b/examples/getty.yml index 3788c6f49..b183613b1 100644 --- a/examples/getty.yml +++ b/examples/getty.yml @@ -14,7 +14,7 @@ onboot: command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"] services: - name: getty - image: linuxkit/getty:894eef1e5f62f3bc31de8ffaff2b6c0e093c4595 + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 # to make insecure with passwordless root login, uncomment following lines #env: # - INSECURE=true diff --git a/examples/minimal.yml b/examples/minimal.yml index 5371e3aba..cec05d6c7 100644 --- a/examples/minimal.yml +++ b/examples/minimal.yml @@ -11,7 +11,7 @@ onboot: command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"] services: - name: getty - image: linuxkit/getty:894eef1e5f62f3bc31de8ffaff2b6c0e093c4595 + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 env: - INSECURE=true trust: diff --git a/examples/node_exporter.yml b/examples/node_exporter.yml index 9711b20de..3a4cce650 100644 --- a/examples/node_exporter.yml +++ b/examples/node_exporter.yml @@ -7,7 +7,7 @@ init: - linuxkit/containerd:8fc87b7f465bde9ece781899a007f47b6d3c096b services: - name: getty - image: linuxkit/getty:894eef1e5f62f3bc31de8ffaff2b6c0e093c4595 + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 env: - INSECURE=true - name: rngd diff --git a/examples/redis-os.yml b/examples/redis-os.yml index f6896b5ff..7d84f1b67 100644 --- a/examples/redis-os.yml +++ b/examples/redis-os.yml @@ -13,7 +13,7 @@ onboot: command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"] services: - name: getty - image: linuxkit/getty:894eef1e5f62f3bc31de8ffaff2b6c0e093c4595 + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 env: - INSECURE=true - name: redis diff --git a/examples/sshd.yml b/examples/sshd.yml index 7296ee5d8..588ad85c2 100644 --- a/examples/sshd.yml +++ b/examples/sshd.yml @@ -11,7 +11,7 @@ onboot: image: linuxkit/sysctl:d1a43c7c91e92374766f962dc8534cf9508756b0 services: - name: getty - image: linuxkit/getty:894eef1e5f62f3bc31de8ffaff2b6c0e093c4595 + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 env: - INSECURE=true - name: rngd diff --git a/examples/swap.yml b/examples/swap.yml index 575899fe8..0546ebfd9 100644 --- a/examples/swap.yml +++ b/examples/swap.yml @@ -24,7 +24,7 @@ onboot: command: ["/swap.sh", "--path", "/var/external/swap", "--size", "1G", "--encrypt"] services: - name: getty - image: linuxkit/getty:894eef1e5f62f3bc31de8ffaff2b6c0e093c4595 + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 env: - INSECURE=true - name: rngd diff --git a/examples/tpm.yml b/examples/tpm.yml index fd381a650..e190c246a 100644 --- a/examples/tpm.yml +++ b/examples/tpm.yml @@ -14,7 +14,7 @@ onboot: command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"] services: - name: getty - image: linuxkit/getty:1b651a91f1c17f50357be9873b580ccf81668630 + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 env: - INSECURE=true - name: tss diff --git a/examples/vmware.yml b/examples/vmware.yml index 50538d0e8..b05b54286 100644 --- a/examples/vmware.yml +++ b/examples/vmware.yml @@ -11,7 +11,7 @@ onboot: image: linuxkit/sysctl:d1a43c7c91e92374766f962dc8534cf9508756b0 services: - name: getty - image: linuxkit/getty:894eef1e5f62f3bc31de8ffaff2b6c0e093c4595 + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 env: - INSECURE=true - name: rngd diff --git a/examples/vultr.yml b/examples/vultr.yml index 8f5d1b751..38e665d67 100644 --- a/examples/vultr.yml +++ b/examples/vultr.yml @@ -16,7 +16,7 @@ onboot: image: linuxkit/metadata:f5d4299909b159db35f72547e4ae70bd76c42c6c services: - name: getty - image: linuxkit/getty:894eef1e5f62f3bc31de8ffaff2b6c0e093c4595 + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 env: - INSECURE=true - name: rngd diff --git a/linuxkit.yml b/linuxkit.yml index b6199a930..5ca5461c0 100644 --- a/linuxkit.yml +++ b/linuxkit.yml @@ -20,7 +20,7 @@ onshutdown: command: ["/bin/echo", "so long and thanks for all the fish"] services: - name: getty - image: linuxkit/getty:894eef1e5f62f3bc31de8ffaff2b6c0e093c4595 + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 env: - INSECURE=true - name: rngd 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..1a474fb86 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 "$INITGETTY" ]; 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 diff --git a/projects/kubernetes/kube-master.yml b/projects/kubernetes/kube-master.yml index f6bde2fce..168b7917e 100644 --- a/projects/kubernetes/kube-master.yml +++ b/projects/kubernetes/kube-master.yml @@ -30,7 +30,7 @@ onboot: - /var/lib:/var/lib services: - name: getty - image: linuxkit/getty:894eef1e5f62f3bc31de8ffaff2b6c0e093c4595 + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 env: - INSECURE=true - name: rngd diff --git a/projects/kubernetes/kube-node.yml b/projects/kubernetes/kube-node.yml index 1b79da21a..c09b7de02 100644 --- a/projects/kubernetes/kube-node.yml +++ b/projects/kubernetes/kube-node.yml @@ -30,7 +30,7 @@ onboot: - /var/lib:/var/lib services: - name: getty - image: linuxkit/getty:894eef1e5f62f3bc31de8ffaff2b6c0e093c4595 + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 env: - INSECURE=true - name: rngd diff --git a/projects/memorizer/memorizer.yml b/projects/memorizer/memorizer.yml index 05a46c9a3..8d5239cf8 100644 --- a/projects/memorizer/memorizer.yml +++ b/projects/memorizer/memorizer.yml @@ -11,7 +11,7 @@ onboot: command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"] services: - name: getty - image: linuxkit/getty:0bd92d5f906491c20e4177c57f965338fe5a8c5f + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 env: - INSECURE=true trust: diff --git a/projects/miragesdk/examples/fdd.yml b/projects/miragesdk/examples/fdd.yml index 9a1611f5c..bba83e882 100644 --- a/projects/miragesdk/examples/fdd.yml +++ b/projects/miragesdk/examples/fdd.yml @@ -12,7 +12,7 @@ onboot: image: linuxkit/sysctl:d1a43c7c91e92374766f962dc8534cf9508756b0 services: - name: getty - image: linuxkit/getty:6cbeee0392b0670053ce2bf05a5a0d67ec2bce05 + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 env: - INSECURE=true - name: rngd diff --git a/projects/miragesdk/examples/mirage-dhcp.yml b/projects/miragesdk/examples/mirage-dhcp.yml index b808dd58b..a79d27932 100644 --- a/projects/miragesdk/examples/mirage-dhcp.yml +++ b/projects/miragesdk/examples/mirage-dhcp.yml @@ -30,7 +30,7 @@ services: - name: sshd image: linuxkit/sshd:dc98a72c1d1285c30f2db176252f3ce2bf645d5b - name: getty - image: linuxkit/getty:894eef1e5f62f3bc31de8ffaff2b6c0e093c4595 + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 env: - INSECURE=true files: diff --git a/projects/shiftfs/shiftfs.yml b/projects/shiftfs/shiftfs.yml index 1920878ba..4c19c237d 100644 --- a/projects/shiftfs/shiftfs.yml +++ b/projects/shiftfs/shiftfs.yml @@ -16,7 +16,7 @@ onboot: command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"] services: - name: getty - image: linuxkit/getty:894eef1e5f62f3bc31de8ffaff2b6c0e093c4595 + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 env: - INSECURE=true - name: rngd diff --git a/projects/swarmd/swarmd.yml b/projects/swarmd/swarmd.yml index 59bf5f71b..888767eae 100644 --- a/projects/swarmd/swarmd.yml +++ b/projects/swarmd/swarmd.yml @@ -23,7 +23,7 @@ onboot: image: linuxkit/metadata:f5d4299909b159db35f72547e4ae70bd76c42c6c services: - name: getty - image: linuxkit/getty:894eef1e5f62f3bc31de8ffaff2b6c0e093c4595 + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 env: - INSECURE=true - name: qemu-ga diff --git a/test/cases/040_packages/007_getty-containerd/test-ctr.yml b/test/cases/040_packages/007_getty-containerd/test-ctr.yml index 8455a5ea8..7cb7c7c04 100644 --- a/test/cases/040_packages/007_getty-containerd/test-ctr.yml +++ b/test/cases/040_packages/007_getty-containerd/test-ctr.yml @@ -12,7 +12,7 @@ onboot: command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"] services: - name: getty - image: linuxkit/getty:894eef1e5f62f3bc31de8ffaff2b6c0e093c4595 + image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02 files: - path: etc/getty.shadow # sample sets password for root to "abcdefgh" (without quotes)