Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge MadcowOG's branch into master #3

Merged
merged 9 commits into from
Jul 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions res/ly-openrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/sbin/openrc-run

name="ly"
description="TUI Display Manager"

## Supervisor daemon
supervisor=supervise-daemon
respawn_period=60
pidfile=/run/"${RC_SVCNAME}.pid"

## Check for getty or agetty
if [ -x /sbin/getty ] || [ -x /bin/getty ];
then
# busybox
commandB="/sbin/getty"
elif [ -x /sbin/agetty ] || [ -x /bin/agetty ];
then
# util-linux
commandUL="/sbin/agetty"
fi

## Get the tty from the conf file
CONFTTY=$(cat /etc/ly/config.ini | sed -n 's/^tty.*=[^1-9]*// p')

## The execution vars
# If CONFTTY is empty then default to 2
TTY="tty${CONFTTY:-'2'}"
TERM=linux
BAUD=38400
# If we don't have getty then we should have agetty
command=${commandB:-$commandUL}
command_args_foreground="-nl /usr/bin/ly $TTY $BAUD $TERM"

depend() {
after agetty
provide display-manager
want elogind
}