mirror of https://github.com/fairyglade/ly.git
Replace systemd service with runit service
This commit is contained in:
parent
77f6958241
commit
28867c4e9c
8
makefile
8
makefile
|
|
@ -78,8 +78,9 @@ install: $(BIND)/$(NAME)
|
||||||
@install -DZ $(RESD)/wsetup.sh -t $(DATADIR)
|
@install -DZ $(RESD)/wsetup.sh -t $(DATADIR)
|
||||||
@install -dZ $(DATADIR)/lang
|
@install -dZ $(DATADIR)/lang
|
||||||
@install -DZ $(RESD)/lang/* -t $(DATADIR)/lang
|
@install -DZ $(RESD)/lang/* -t $(DATADIR)/lang
|
||||||
@install -DZ $(RESD)/ly.service -m 644 -t ${DESTDIR}/usr/lib/systemd/system
|
|
||||||
@install -DZ $(RESD)/pam.d/ly -m 644 -t ${DESTDIR}/etc/pam.d
|
@install -DZ $(RESD)/pam.d/ly -m 644 -t ${DESTDIR}/etc/pam.d
|
||||||
|
@install -dZ ${DESTDIR}/etc/runit/sv/ly
|
||||||
|
@install -DZ $(RESD)/ly/* -t ${DESTDIR}/etc/runit/sv/ly
|
||||||
|
|
||||||
installnoconf: $(BIND)/$(NAME)
|
installnoconf: $(BIND)/$(NAME)
|
||||||
@echo "installing without the configuration file"
|
@echo "installing without the configuration file"
|
||||||
|
|
@ -89,16 +90,17 @@ installnoconf: $(BIND)/$(NAME)
|
||||||
@install -DZ $(RESD)/wsetup.sh -t $(DATADIR)
|
@install -DZ $(RESD)/wsetup.sh -t $(DATADIR)
|
||||||
@install -dZ $(DATADIR)/lang
|
@install -dZ $(DATADIR)/lang
|
||||||
@install -DZ $(RESD)/lang/* -t $(DATADIR)/lang
|
@install -DZ $(RESD)/lang/* -t $(DATADIR)/lang
|
||||||
@install -DZ $(RESD)/ly.service -m 644 -t ${DESTDIR}/usr/lib/systemd/system
|
|
||||||
@install -DZ $(RESD)/pam.d/ly -m 644 -t ${DESTDIR}/etc/pam.d
|
@install -DZ $(RESD)/pam.d/ly -m 644 -t ${DESTDIR}/etc/pam.d
|
||||||
|
@install -dZ ${DESTDIR}/etc/runit/sv/ly
|
||||||
|
@install -DZ $(RESD)/ly/* -t ${DESTDIR}/etc/runit/sv/ly
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
@echo "uninstalling"
|
@echo "uninstalling"
|
||||||
@rm -rf ${DESTDIR}/etc/ly
|
@rm -rf ${DESTDIR}/etc/ly
|
||||||
@rm -rf $(DATADIR)
|
@rm -rf $(DATADIR)
|
||||||
@rm -f ${DESTDIR}/usr/bin/ly
|
@rm -f ${DESTDIR}/usr/bin/ly
|
||||||
@rm -f ${DESTDIR}/usr/lib/systemd/system/ly.service
|
|
||||||
@rm -f ${DESTDIR}/etc/pam.d/ly
|
@rm -f ${DESTDIR}/etc/pam.d/ly
|
||||||
|
@rm -rf ${DESTDIR}/etc/runit/sv/ly
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@echo "cleaning"
|
@echo "cleaning"
|
||||||
|
|
|
||||||
25
readme.md
25
readme.md
|
|
@ -1,8 +1,12 @@
|
||||||
# Ly - a TUI display manager
|
# Ly - a TUI display manager (for Artix Linux)
|
||||||

|

|
||||||
|
|
||||||
Ly is a lightweight TUI (ncurses-like) display manager for Linux and BSD.
|
Ly is a lightweight TUI (ncurses-like) display manager for Linux and BSD.
|
||||||
|
|
||||||
|
## Patches added in fork
|
||||||
|
- runit service instead of systemd one by @qub1750ul
|
||||||
|
- service installed on default Artix service path (`/etc/runit/sv/`)
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
- a C99 compiler (tested with tcc and gcc)
|
- a C99 compiler (tested with tcc and gcc)
|
||||||
- a C standard library
|
- a C standard library
|
||||||
|
|
@ -47,7 +51,7 @@ changing the source code won't be necessary :)
|
||||||
## Cloning and Compiling
|
## Cloning and Compiling
|
||||||
Clone the repository
|
Clone the repository
|
||||||
```
|
```
|
||||||
git clone https://github.com/nullgemm/ly.git
|
git clone https://github.com/xcession/ly-artix-runit.git
|
||||||
```
|
```
|
||||||
|
|
||||||
Fetch submodules
|
Fetch submodules
|
||||||
|
|
@ -60,26 +64,19 @@ Compile
|
||||||
make
|
make
|
||||||
```
|
```
|
||||||
|
|
||||||
Test in the configured tty (tty2 by default)
|
Install Ly and the runit service file
|
||||||
or a terminal emulator (but desktop environments won't start)
|
|
||||||
```
|
|
||||||
sudo make run
|
|
||||||
```
|
|
||||||
|
|
||||||
Install Ly and the provided systemd service file
|
|
||||||
```
|
```
|
||||||
sudo make install
|
sudo make install
|
||||||
```
|
```
|
||||||
|
|
||||||
Enable the service
|
You can disable getty-tty2
|
||||||
```
|
```
|
||||||
sudo systemctl enable ly.service
|
sudo unlink /run/runit/service/agetty-tty2
|
||||||
```
|
```
|
||||||
|
|
||||||
If you need to switch between ttys after Ly's start you also have to
|
Now enable the runit service to make it spawn on startup
|
||||||
disable getty on Ly's tty to prevent "login" from spawning on top of it
|
|
||||||
```
|
```
|
||||||
sudo systemctl disable getty@tty2.service
|
sudo ln -s /etc/runit/sv/ly/ /run/runit/service/
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
if [ -x /sbin/agetty -o -x /bin/agetty ]; then
|
||||||
|
# util-linux specific settings
|
||||||
|
if [ "${tty}" = "tty1" ]; then
|
||||||
|
GETTY_ARGS="--noclear"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
BAUD_RATE=38400
|
||||||
|
TERM_NAME=linux
|
||||||
|
|
||||||
|
StandardInput=tty
|
||||||
|
TTYPath=/dev/tty2
|
||||||
|
TTYReset=yes
|
||||||
|
TTYVHangup=yes
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
tty=${PWD##*-}
|
||||||
|
exec utmpset -w $tty
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
tty=${PWD##*-}
|
||||||
|
|
||||||
|
[ -r conf ] && . ./conf
|
||||||
|
|
||||||
|
if [ -x /sbin/getty -o -x /bin/getty ]; then
|
||||||
|
# busybox
|
||||||
|
GETTY=getty
|
||||||
|
elif [ -x /sbin/agetty -o -x /bin/agetty ]; then
|
||||||
|
# util-linux
|
||||||
|
GETTY=agetty
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec setsid ${GETTY} ${GETTY_ARGS} -nl /usr/bin/ly tty2 "${BAUD_RATE}" "${TERM_NAME}"
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=TUI display manager
|
|
||||||
After=systemd-user-sessions.service plymouth-quit-wait.service
|
|
||||||
After=getty@tty2.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=idle
|
|
||||||
ExecStart=/usr/bin/ly
|
|
||||||
StandardInput=tty
|
|
||||||
TTYPath=/dev/tty2
|
|
||||||
TTYReset=yes
|
|
||||||
TTYVHangup=yes
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
Alias=display-manager.service
|
|
||||||
Loading…
Reference in New Issue