Compare commits

..
4 Commits
Author SHA1 Message Date
KeyitdevandGitHub abb3163c72 Merge pull request #95 from NonameBlank007/cleanup
Improve system init detection and runit compatibility in setup.sh
2026-09-18 19:26:03 +02:00
NonameBlank007andGitHub b5fac9358f Update setup.sh
- Download additional pkg only if os-release ID=artix
2026-07-14 00:01:47 +05:30
Noname Blank 8fb1c72df5 Feat: add check for runit with pacman
It requires additional sddm-runit to add to service file directory (e.g., Artix-runit)

Signed-off-by: Noname Blank <nonameblank007@gmail.com>
2026-07-13 16:16:09 +05:30
Noname Blank d3b6cbbddd Fix: check for correct sv path and runsvdir improvements
1. The previous commit didn't account for correct "sv" path.
2. The previous setup gave priority to artix runit setup, but sv path was incorrect
 - Its "/etc/runit/sv", but accidentaly gave "/etc/sv" which dosen't exist.
 - So, improve it by adding various other check and make it a branch "if-elif" check.
 - Called '_runit_sv'.
3. Improve on/default to first check for current running system dir's insted.
 - Prioritise current running insted of Not/Enabled symlinked "/etc/runit/runsvdir/default".
 - Above should only gave priority if it is not enabled/running.
 - So, not recommended.

link of ref:
[1]: https://docs.voidlinux.org/config/services/index.html | Enabling Services
[2]: https://wiki.gentoo.org/wiki/Runit#Runit_and_service_management | 3.4.2
[3]: https://wiki.artixlinux.org/Main/Runit | Basic usage

Signed-off-by: Noname Blank <nonameblank007@gmail.com>
2026-07-13 16:16:01 +05:30
+23 -5
View File
@@ -181,8 +181,19 @@ _disable_dm_dinit() {
done
}
_runit_sv() {
if [ -d /etc/sv ]; then echo "/etc/sv"
elif [ -d /etc/runit/sv ]; then echo "/etc/runit/sv"
else
error "Cannot find runit service configuration files directory"
return 1
fi
}
_runit_runsvdir() {
if [ -d /run/runit/service ]; then echo "/run/runit/service"
if [ -d /service ]; then echo "/service" # legacy/upstream symlink
elif [ -d /var/service ]; then echo "/var/service"
elif [ -d /run/runit/service ]; then echo "/run/runit/service"
elif [ -d /etc/runit/runsvdir/default ]; then echo "/etc/runit/runsvdir/default"
else
error "Cannot find runit service directory"
@@ -230,16 +241,23 @@ enable_sddm() {
;;
runit)
local sv
local runsvdir
sv=$(_runit_sv)
runsvdir=$(_runit_runsvdir)
if [ ! -d /etc/sv/sddm ]; then
error "/etc/sv/sddm not found - is sddm-runit (or equivalent) installed?"
if [ -f /etc/os-release ] && grep -q 'ID=artix' /etc/os-release; then
sudo pacman --needed -S sddm-runit
info "sddm-runit installed for Artix Linux"
fi
if [ ! -d "$sv/sddm" ]; then
error "$sv/sddm not found - is sddm-runit (or equivalent) installed?"
return 1
fi
_disable_dm_runit
sudo ln -sf /etc/sv/sddm "$runsvdir/sddm"
sudo ln -sf "$sv/sddm" "$runsvdir/"
info "sddm symlinked into $runsvdir"
;;
@@ -268,7 +286,7 @@ enable_sddm() {
echo ""
echo " systemd - sudo systemctl enable --now sddm"
echo " openrc - sudo rc-update add sddm default"
echo " runit - sudo ln -s /etc/sv/sddm /run/runit/service/"
echo " runit - sudo ln -s /etc/sv/sddm /var/service/ || sudo ln -s /etc/runit/sv/sddm /run/runit/service/"
echo " dinit - sudo ln -s /etc/dinit.d/sddm /etc/dinit.d/boot.d/sddm"
return 1
;;