summaryrefslogtreecommitdiff
path: root/bin/live-getty
diff options
context:
space:
mode:
Diffstat (limited to 'bin/live-getty')
-rwxr-xr-xbin/live-getty20
1 files changed, 20 insertions, 0 deletions
diff --git a/bin/live-getty b/bin/live-getty
new file mode 100755
index 0000000..6781ea5
--- /dev/null
+++ b/bin/live-getty
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+set -e
+
+AUTOLOGIN="1"
+
+for ARGUMENT in "${@}"
+do
+ if [ "${ARGUMENT}" = "-l" ] || [ "${ARGUMENT}" = "-n" ]
+ then
+ AUTOLOGIN="0"
+ fi
+done
+
+if [ "${AUTOLOGIN}" = "1" ]
+then
+ exec /sbin/getty -n -l /sbin/live-login ${*}
+else
+ exec /sbin/getty ${*}
+fi