-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OpenRC service and support for more inits (#368)
Add OpenRC service and support for other init services Co-authored-by: Jonathan <78560204+wncry@users.noreply.github.com> Co-authored-by: MadcowOG <null> Co-authored-by: MadcowOG <88654251+MadcowOG@users.noreply.github.com>
- Loading branch information
1 parent
309b97d
commit 0cefb3d
Showing
3 changed files
with
71 additions
and
5 deletions.
There are no files selected for viewing
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
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
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
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 | ||
} |