From d3b6cbbdddb4c4b5c1f26e4d666eb49a6288682c Mon Sep 17 00:00:00 2001 From: Noname Blank Date: Mon, 13 Jul 2026 14:27:31 +0530 Subject: [PATCH 1/3] 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 --- setup.sh | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/setup.sh b/setup.sh index 0cc57eb..e150695 100755 --- a/setup.sh +++ b/setup.sh @@ -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,18 @@ 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 [ ! -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 +281,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 ;; From 8fb1c72df5fe7602d099911a859e47c8f0ac121f Mon Sep 17 00:00:00 2001 From: Noname Blank Date: Mon, 13 Jul 2026 15:35:08 +0530 Subject: [PATCH 2/3] 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 --- setup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.sh b/setup.sh index e150695..a35afc4 100755 --- a/setup.sh +++ b/setup.sh @@ -246,6 +246,11 @@ enable_sddm() { sv=$(_runit_sv) runsvdir=$(_runit_runsvdir) + if command -v pacman >/dev/null 2>&1; then + sudo pacman --needed -S sddm-runit + info "sddm-runit installed. As additional pkg." + fi + if [ ! -d "$sv/sddm" ]; then error "$sv/sddm not found - is sddm-runit (or equivalent) installed?" return 1 From b5fac9358f05fa754fcb3075b4a399b5b875f0a8 Mon Sep 17 00:00:00 2001 From: NonameBlank007 Date: Tue, 14 Jul 2026 00:01:47 +0530 Subject: [PATCH 3/3] Update setup.sh - Download additional pkg only if os-release ID=artix --- setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index a35afc4..ada93cc 100755 --- a/setup.sh +++ b/setup.sh @@ -246,9 +246,9 @@ enable_sddm() { sv=$(_runit_sv) runsvdir=$(_runit_runsvdir) - if command -v pacman >/dev/null 2>&1; then + if [ -f /etc/os-release ] && grep -q 'ID=artix' /etc/os-release; then sudo pacman --needed -S sddm-runit - info "sddm-runit installed. As additional pkg." + info "sddm-runit installed for Artix Linux" fi if [ ! -d "$sv/sddm" ]; then