Browse Source

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.
pull/12/head
Dudemanguy 5 months ago
parent
commit
f29508d011
  1. 12
      Makefile
  2. 0
      data/s6/default/contents.d/artix-live
  3. 0
      data/s6/default/contents.d/pacman-init
  4. 6
      libalpm/scripts/liveservices-hook

12
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

0
data/s6/default/contents.d/artix-live

0
data/s6/default/contents.d/pacman-init

6
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

Loading…
Cancel
Save