Merge pull request #2365 from deitch/test-dev-existence-getty

Test dev existence getty
This commit is contained in:
Justin Cormack 2017-08-07 20:32:39 +01:00 committed by GitHub
commit e61794a344
22 changed files with 28 additions and 22 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -7,7 +7,7 @@ init:
- linuxkit/containerd:f69bc5b8ec0392e2d34d3fd3bfdb7266ef6d4ed4
services:
- name: getty
image: linuxkit/getty:2c841cdc34396e3fa8f25b62d112808f63f16df6
image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec
env:
- INSECURE=true
- name: rngd

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 &

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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)