run 420 B

123456789101112131415161718192021222324
  1. #!/bin/sh
  2. user=root
  3. baud=38400
  4. delay=3
  5. export TERM=linux
  6. tty="/dev/${PWD##*/getty_}"
  7. if ! test -e "$tty"; then
  8. exec env - sleep 32000
  9. fi
  10. sleep "$delay"
  11. chown "$user" "$tty" # - devfs made happy
  12. exec <"$tty" >"$tty" 2>&1
  13. # using . in order to be able to set env (TERM etc) in cfg
  14. test -x ./cfg && . ./cfg
  15. exec \
  16. env - "TERM=$TERM" PATH="$PATH" LOGIN_PRE_SUID_SCRIPT="$PWD/login.sh" \
  17. getty "$baud" "$tty" "$TERM"