blob: c5b291b4d83269a047e6918be3e29b8a125a9c69 [file] [log] [blame]
Denys Vlasenkof5c2f722009-11-08 00:55:39 +01001#!/bin/sh
2
Denys Vlasenkof5c2f722009-11-08 00:55:39 +01003user=root
4baud=38400
5delay=3
6export TERM=linux
7
8tty="/dev/${PWD##*/getty_}"
9
10if ! test -e "$tty"; then
11 exec env - sleep 32000
12fi
13
14sleep "$delay"
15
16chown "$user" "$tty" # - devfs made happy
17
18exec <"$tty" >"$tty" 2>&1
19# using . in order to be able to set env (TERM etc) in cfg
20test -x ./cfg && . ./cfg
21
22exec \
23env - "TERM=$TERM" PATH="$PATH" LOGIN_PRE_SUID_SCRIPT="$PWD/login.sh" \
Denys Vlasenkof5c2f722009-11-08 00:55:39 +010024getty "$baud" "$tty" "$TERM"