diff --git a/blueprints/docker-for-mac/base.yml b/blueprints/docker-for-mac/base.yml index 7da45e10e..16d686e5a 100644 --- a/blueprints/docker-for-mac/base.yml +++ b/blueprints/docker-for-mac/base.yml @@ -53,7 +53,7 @@ services: image: linuxkit/acpid:79e5c20de96e1633c9c40935b99dde45aefba37b # Enable getty for easier debugging - name: getty - image: linuxkit/getty:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec env: - INSECURE=true # Run ntpd to keep time synchronised in the VM diff --git a/examples/docker.yml b/examples/docker.yml index c3edfe6b2..027573d5c 100644 --- a/examples/docker.yml +++ b/examples/docker.yml @@ -18,7 +18,7 @@ onboot: command: ["/usr/bin/mountie", "/var/lib/docker"] services: - name: getty - image: linuxkit/getty:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec env: - INSECURE=true - name: rngd diff --git a/examples/gcp.yml b/examples/gcp.yml index ef9a23d4e..ac4d62ed3 100644 --- a/examples/gcp.yml +++ b/examples/gcp.yml @@ -16,7 +16,7 @@ onboot: image: linuxkit/metadata:cec86f3e1c260c9eafefa80c262fceb40c182ddf services: - name: getty - image: linuxkit/getty:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec env: - INSECURE=true - name: rngd diff --git a/examples/getty.yml b/examples/getty.yml index d98aff629..9da36caff 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:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec # to make insecure with passwordless root login, uncomment following lines #env: # - INSECURE=true diff --git a/examples/minimal.yml b/examples/minimal.yml index f9e1551f6..e8cc5dd16 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:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec env: - INSECURE=true trust: diff --git a/examples/node_exporter.yml b/examples/node_exporter.yml index 87c5cfb06..034666bd7 100644 --- a/examples/node_exporter.yml +++ b/examples/node_exporter.yml @@ -7,7 +7,7 @@ init: - linuxkit/containerd:f69bc5b8ec0392e2d34d3fd3bfdb7266ef6d4ed4 services: - name: getty - image: linuxkit/getty:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec env: - INSECURE=true - name: rngd diff --git a/examples/redis-os.yml b/examples/redis-os.yml index 67b94f6de..6cd991b16 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:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec env: - INSECURE=true - name: redis diff --git a/examples/sshd.yml b/examples/sshd.yml index f8b65e0c6..c1276aa0b 100644 --- a/examples/sshd.yml +++ b/examples/sshd.yml @@ -14,7 +14,7 @@ onboot: command: ["/sbin/rngd", "-1"] services: - name: getty - image: linuxkit/getty:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec env: - INSECURE=true - name: rngd diff --git a/examples/swap.yml b/examples/swap.yml index 2ad0b77fe..6ee5d82d4 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:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec env: - INSECURE=true - name: rngd diff --git a/examples/tpm.yml b/examples/tpm.yml index cc5871bc4..2cee29ccc 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:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec env: - INSECURE=true - name: tss diff --git a/examples/vmware.yml b/examples/vmware.yml index b6a9bd625..0f840ea28 100644 --- a/examples/vmware.yml +++ b/examples/vmware.yml @@ -11,7 +11,7 @@ onboot: image: linuxkit/sysctl:154913b72c6f1f33eb408609fca9963628e8c051 services: - name: getty - image: linuxkit/getty:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec env: - INSECURE=true - name: rngd diff --git a/examples/vultr.yml b/examples/vultr.yml index 983292bfc..a1f1c5e59 100644 --- a/examples/vultr.yml +++ b/examples/vultr.yml @@ -16,7 +16,7 @@ onboot: image: linuxkit/metadata:cec86f3e1c260c9eafefa80c262fceb40c182ddf services: - name: getty - image: linuxkit/getty:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec env: - INSECURE=true - name: rngd diff --git a/linuxkit.yml b/linuxkit.yml index d22ac7f01..2d96d007a 100644 --- a/linuxkit.yml +++ b/linuxkit.yml @@ -18,7 +18,7 @@ onshutdown: command: ["/bin/echo", "so long and thanks for all the fish"] services: - name: getty - image: linuxkit/getty:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec env: - INSECURE=true - name: rngd diff --git a/pkg/getty/usr/bin/rungetty.sh b/pkg/getty/usr/bin/rungetty.sh index 1a474fb86..a75137ddb 100755 --- a/pkg/getty/usr/bin/rungetty.sh +++ b/pkg/getty/usr/bin/rungetty.sh @@ -15,6 +15,12 @@ start_getty() { term="linux" [ "$speed" = "$1" ] && speed=115200 + # does the device even exist? + if [ ! -c /dev/$tty ]; then + echo "getty: cmdline has console=$tty but /dev/$tty is not a character device; not starting getty for $tty" | tee /dev/console + return + fi + case "$tty" in ttyS*|ttyAMA*|ttyUSB*|ttyMFD*) line="-L" @@ -35,7 +41,7 @@ start_getty() { if ! grep -q -w "$tty" "$securetty"; then # we could not find the tty in securetty, so start a getty but warn that root login will not work - echo "getty: cmdline has console=$tty but does not exist in $securetty; will not be able to log in as root on this tty $tty." > /dev/$tty + echo "getty: cmdline has console=$tty but does not exist in $securetty; will not be able to log in as root on this tty $tty." | tee /dev/$tty fi # respawn forever infinite_loop setsid.getty -w /sbin/agetty $loginargs $line $speed $tty $term & diff --git a/projects/kubernetes/kube-master.yml b/projects/kubernetes/kube-master.yml index 2a1c1fcbb..7db6b041f 100644 --- a/projects/kubernetes/kube-master.yml +++ b/projects/kubernetes/kube-master.yml @@ -28,7 +28,7 @@ onboot: - /var/lib:/var/lib services: - name: getty - image: linuxkit/getty:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec env: - INSECURE=true - name: rngd diff --git a/projects/kubernetes/kube-node.yml b/projects/kubernetes/kube-node.yml index 9c050f2cd..40c1ac26f 100644 --- a/projects/kubernetes/kube-node.yml +++ b/projects/kubernetes/kube-node.yml @@ -28,7 +28,7 @@ onboot: - /var/lib:/var/lib services: - name: getty - image: linuxkit/getty:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec env: - INSECURE=true - name: rngd diff --git a/projects/memorizer/memorizer.yml b/projects/memorizer/memorizer.yml index 10b336239..b91523c35 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:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec env: - INSECURE=true trust: diff --git a/projects/miragesdk/examples/fdd.yml b/projects/miragesdk/examples/fdd.yml index 2645de68b..03877c327 100644 --- a/projects/miragesdk/examples/fdd.yml +++ b/projects/miragesdk/examples/fdd.yml @@ -12,7 +12,7 @@ onboot: image: linuxkit/sysctl:154913b72c6f1f33eb408609fca9963628e8c051 services: - name: getty - image: linuxkit/getty:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec env: - INSECURE=true - name: rngd diff --git a/projects/miragesdk/examples/mirage-dhcp.yml b/projects/miragesdk/examples/mirage-dhcp.yml index 024161ac3..8a30c30c3 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:505a985d7bd7a90f15eca9cb4dc6ec92789d51a0 - name: getty - image: linuxkit/getty:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec env: - INSECURE=true files: diff --git a/projects/shiftfs/shiftfs.yml b/projects/shiftfs/shiftfs.yml index cb268158b..44328a1a2 100644 --- a/projects/shiftfs/shiftfs.yml +++ b/projects/shiftfs/shiftfs.yml @@ -14,7 +14,7 @@ onboot: command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"] services: - name: getty - image: linuxkit/getty:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec env: - INSECURE=true - name: rngd diff --git a/projects/swarmd/swarmd.yml b/projects/swarmd/swarmd.yml index a7d594a26..d85b0c671 100644 --- a/projects/swarmd/swarmd.yml +++ b/projects/swarmd/swarmd.yml @@ -23,7 +23,7 @@ onboot: image: linuxkit/metadata:cec86f3e1c260c9eafefa80c262fceb40c182ddf services: - name: getty - image: linuxkit/getty:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec 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 fb20aa4d5..db70e48c3 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:2c841cdc34396e3fa8f25b62d112808f63f16df6 + image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec files: - path: etc/getty.shadow # sample sets password for root to "abcdefgh" (without quotes)