Created
April 23, 2024 20:50
-
-
Save sulincix/c225778874e357bd7a822d0530819e48 to your computer and use it in GitHub Desktop.
minimal getty but bash script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# minimal getty like script | |
# speed ignored. | |
# bgetty 38400 tty1 /bin/login | |
if [ $# -lt 3 ] ; then | |
echo "Usage: $0 [speed] [tty] [command]" | |
exit 1 | |
fi | |
exec >/dev/$2 | |
exec </dev/$2 | |
exec 2>/dev/$2 | |
shift 2 | |
while true ; do | |
busybox setsid "$@" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment