mirror of
https://github.com/javalsai/lidm.git
synced 2025-07-03 14:25:03 +02:00
feat: add openrc support
This commit is contained in:
parent
b4fbe68542
commit
ae4e4df7cd
7
Makefile
7
Makefile
@ -55,11 +55,14 @@ install-service:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
install-service-systemd:
|
install-service-systemd:
|
||||||
install -m655 ./assets/services/systemd.service /etc/systemd/system/lidm.service
|
install -m644 ./assets/services/systemd.service /etc/systemd/system/lidm.service
|
||||||
@printf '\x1b[1m%s\x1b[0m\n\n' " don't forget to run 'systemctl enable lidm'"
|
@printf '\x1b[1m%s\x1b[0m\n\n' " don't forget to run 'systemctl enable lidm'"
|
||||||
install-service-dinit:
|
install-service-dinit:
|
||||||
install -m655 ./assets/services/dinit /etc/dinit.d/lidm
|
install -m644 ./assets/services/dinit /etc/dinit.d/lidm
|
||||||
@printf '\x1b[1m%s\x1b[0m\n\n' " don't forget to run 'dinitctl enable lidm'"
|
@printf '\x1b[1m%s\x1b[0m\n\n' " don't forget to run 'dinitctl enable lidm'"
|
||||||
install-service-runit:
|
install-service-runit:
|
||||||
rsync -a --no-owner --no-group ./assets/services/runit/. /etc/runit/sv/lidm
|
rsync -a --no-owner --no-group ./assets/services/runit/. /etc/runit/sv/lidm
|
||||||
@printf '\x1b[1m%s\x1b[0m\n\n' " don't forget to run 'ln -s /etc/runit/sv/lidm /run/runit/service' and 'sv enable lidm'"
|
@printf '\x1b[1m%s\x1b[0m\n\n' " don't forget to run 'ln -s /etc/runit/sv/lidm /run/runit/service' and 'sv enable lidm'"
|
||||||
|
install-service-openrc:
|
||||||
|
install -m755 ./assets/services/openrc /etc/init.d/lidm
|
||||||
|
@printf '\x1b[1m%s\x1b[0m\n\n' " don't forget to run 'rc-update add lidm'"
|
||||||
|
@ -24,7 +24,7 @@ LiDM is like any [X Display Manager](https://en.wikipedia.org/wiki/X_display_man
|
|||||||
* Fast and possibly efficient.
|
* Fast and possibly efficient.
|
||||||
* Fully customizable, from strings, including action keys, to colors (I hope you know ansi escape codes)
|
* Fully customizable, from strings, including action keys, to colors (I hope you know ansi escape codes)
|
||||||
* Automatically detects xorg and wayland sessions, plus allowing to launch the default user shell (if enabled in config)
|
* Automatically detects xorg and wayland sessions, plus allowing to launch the default user shell (if enabled in config)
|
||||||
* Starts with many init systems (systemd, dinit and runit).
|
* Starts with many init systems (systemd, dinit, runit and openrc).
|
||||||
|
|
||||||
## WIP
|
## WIP
|
||||||
* Desktop's file `TryExec` key.
|
* Desktop's file `TryExec` key.
|
||||||
@ -60,7 +60,7 @@ We all know that the most important thing in a project is the ideology of the au
|
|||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
### Arguments
|
### Arguments
|
||||||
If a single argument is provided (don't even do `--` or standard parsing...), it passes that argument to `chvt` on startup, used (at least) by the dinit and runit services.
|
If a single argument is provided (don't even do `--` or standard parsing...), it passes that argument to `chvt` on startup, used (at least) by most service files.
|
||||||
|
|
||||||
### Program
|
### Program
|
||||||
On top of pure intuition:
|
On top of pure intuition:
|
||||||
|
@ -8,17 +8,21 @@ There's make scripts to automatically copy the service files to the proper locat
|
|||||||
The manuall steps for installation are:
|
The manuall steps for installation are:
|
||||||
|
|
||||||
## Systemd
|
## Systemd
|
||||||
* Copy `systemd.service` to `/etc/systemd/system/lidm.service`.
|
* Copy `systemd.service` to `/etc/systemd/system/lidm.service`
|
||||||
* To enable it you can run `systemctl enable lidm`
|
* To enable it you can run `systemctl enable lidm`
|
||||||
|
|
||||||
## Dinit
|
## Dinit
|
||||||
* Copy `dinit` to `/etc/dinit.d/lidm`.
|
* Copy `dinit` to `/etc/dinit.d/lidm`
|
||||||
* To enable it, run `dinitctl enable lidm`.
|
* To enable it, run `dinitctl enable lidm`
|
||||||
|
|
||||||
## Runit
|
## Runit
|
||||||
* Copy `runit/` to `/etc/runit/sv/lidm/`.
|
* Copy `runit/` to `/etc/runit/sv/lidm/`
|
||||||
* Add the service with `ln -s /etc/runit/sv/lidm /run/runit/service`.
|
* Add the service with `ln -s /etc/runit/sv/lidm /run/runit/service`
|
||||||
* And to enable it `sv enable lidm`
|
* And to enable it `sv enable lidm`
|
||||||
|
|
||||||
|
## OpenRC
|
||||||
|
* Copy `openrc` to `/etc/init.d/lidm`
|
||||||
|
* Enable the service with `rc-update add lidm`
|
||||||
|
|
||||||
> [!WARNING]
|
> [!WARNING]
|
||||||
> Make sure to disable any other service that might run on tty7, such us lightdm or most display managers out there.
|
> Make sure to disable any other service that might run on tty7, such us lightdm or most display managers out there.
|
||||||
|
31
assets/services/openrc
Executable file
31
assets/services/openrc
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/bin/openrc-run
|
||||||
|
description="start agetty on a terminal line"
|
||||||
|
supervisor=supervise-daemon
|
||||||
|
port=tty7
|
||||||
|
respawn_period="${respawn_period:-60}"
|
||||||
|
term_type="${term_type:-linux}"
|
||||||
|
command=/sbin/agetty
|
||||||
|
command_args_foreground="${agetty_options} ${port} ${baud} ${term_type} -nl /bin/lidm -o 7"
|
||||||
|
pidfile="/run/${RC_SVCNAME}.pid"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
after local
|
||||||
|
keyword -prefix
|
||||||
|
provide getty
|
||||||
|
}
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
if [ "$port" = "$RC_SVCNAME" ]; then
|
||||||
|
eerror "${RC_SVCNAME} cannot be started directly. You must create"
|
||||||
|
eerror "symbolic links to it for the ports you want to start"
|
||||||
|
eerror "agetty on and add those to the appropriate runlevels."
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
export EINFO_QUIET="${quiet:-yes}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
stop_pre()
|
||||||
|
{
|
||||||
|
export EINFO_QUIET="${quiet:-yes}"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user