From f29508d0113972efe692fcd0ebf7589d09a097f9 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Sun, 23 Jan 2022 13:15:15 -0600 Subject: [PATCH] s6: update to the new s6-rc format s6-scripts finally updated to the new s6-rc format so the live-service needs to change its formating to match. The main advantage of this is that there is no need to sed in artix-live and pacman-init into the contents file during the alpm hook. Instead, the empty files can just be installed into the directory. It's much cleaner. As an aside, a couple of BMODE calls in the makefile were changed to FMODE since s6-rc doesn't need any of these files to be executable. --- Makefile | 12 ++++++++++-- data/s6/default/contents.d/artix-live | 0 data/s6/default/contents.d/pacman-init | 0 libalpm/scripts/liveservices-hook | 6 ------ 4 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 data/s6/default/contents.d/artix-live create mode 100644 data/s6/default/contents.d/pacman-init diff --git a/Makefile b/Makefile index 0ff31c6..018c1c6 100644 --- a/Makefile +++ b/Makefile @@ -40,6 +40,10 @@ RUNIT_SVD = \ RUNIT_SV = \ data/runit/pacman-init.run +S6_DEFAULT = \ + data/s6/default/contents.d/artix-live \ + data/s6/default/contents.d/pacman-init + S6_LIVE = \ data/s6/artix-live/up \ data/s6/artix-live/type @@ -127,12 +131,16 @@ install_runit: install_s6: install_alpm install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/s6/sv + install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/s6/adminsv + + install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/s6/adminsv/default/contents.d + install $(FMODE) $(S6_DEFAULT) $(DESTDIR)$(SYSCONFDIR)/s6/adminsv/default/contents.d/ install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/s6/sv/pacman-init - install $(BMODE) $(S6_PI) $(DESTDIR)$(SYSCONFDIR)/s6/sv/pacman-init/ + install $(FMODE) $(S6_PI) $(DESTDIR)$(SYSCONFDIR)/s6/sv/pacman-init/ install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/s6/sv/artix-live - install $(BMODE) $(S6_LIVE) $(DESTDIR)$(SYSCONFDIR)/s6/sv/artix-live/ + install $(FMODE) $(S6_LIVE) $(DESTDIR)$(SYSCONFDIR)/s6/sv/artix-live/ install_66: install_alpm install $(DMODE) $(DESTDIR)$(SYSCONFDIR)/66/service diff --git a/data/s6/default/contents.d/artix-live b/data/s6/default/contents.d/artix-live new file mode 100644 index 0000000..e69de29 diff --git a/data/s6/default/contents.d/pacman-init b/data/s6/default/contents.d/pacman-init new file mode 100644 index 0000000..e69de29 diff --git a/libalpm/scripts/liveservices-hook b/libalpm/scripts/liveservices-hook index 79db1cd..2e4fbef 100644 --- a/libalpm/scripts/liveservices-hook +++ b/libalpm/scripts/liveservices-hook @@ -11,15 +11,9 @@ s6_enable_live_services(){ if [ -d /etc/s6/sv/sddm/dependencies.d ]; then touch /etc/s6/sv/sddm/dependencies.d/artix-live fi - # TODO: instead touch files under dependencies.d when s6-scripts updates - echo "artix-live" >> /etc/s6/sv/default/contents - echo "pacman-init" >> /etc/s6/sv/default/contents } s6_disable_live_services(){ - # TODO: delete files under dependencies.d when s6-scripts updates - sed -i '/artix-live/d' /etc/s6/sv/default/contents - sed -i '/pacman-init/d' /etc/s6/sv/default/contents rm -f /etc/s6/sv/gdm/dependencies.d/artix-live rm -f /etc/s6/sv/lightdm-srv/dependencies.d/artix-live rm -f /etc/s6/sv/sddm/dependencies.d/artix-live