From 37fe023e06d5ac942e8300116eeeacf66eb901a6 Mon Sep 17 00:00:00 2001 From: Justin Cormack Date: Wed, 14 Sep 2016 00:12:39 +0100 Subject: [PATCH] Do not prompt for username at login Given you can login as root with no password on the console, asking which user you would like to login as is rather pointless. Do have to tweak /etc/issue though as busybox getty does not display it without a prompt, and we want a whale. Signed-off-by: Justin Cormack --- alpine/etc/issue | 8 ++++---- alpine/init | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/alpine/etc/issue b/alpine/etc/issue index d7fd94a07..f5a95ea49 100644 --- a/alpine/etc/issue +++ b/alpine/etc/issue @@ -1,12 +1,12 @@ + Welcome to Moby -Kernel \r on an \m (\l) ## . ## ## ## == ## ## ## ## ## === /"""""""""""""""""\___/ === ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~ - \\______ o __/ - \\ \\ __/ - \\____\\_______/ + \______ o __/ + \ \ __/ + \____\_______/ diff --git a/alpine/init b/alpine/init index 5519d5b3f..46c52bceb 100755 --- a/alpine/init +++ b/alpine/init @@ -22,7 +22,8 @@ setup_console() { # skip consoles already in inittab grep -q "^$tty:" "$inittab" && return - echo "$tty::respawn:/sbin/getty $line $speed $tty $term" >> "$inittab" + echo "$tty::once:cat /etc/issue" >> "$inittab" + echo "$tty::respawn:/sbin/getty -n -l /bin/sh $line $speed $tty $term" >> "$inittab" if ! grep -q -w "$tty" "$securetty"; then echo "$tty" >> "$securetty" fi