aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2012-08-18 10:06:51 +0200
committerTom Gundersen <teg@jklm.no>2012-08-20 16:25:49 +0200
commit137302c545006f0c4e89616f1c0e6cc2a7294969 (patch)
tree849ee9a5bf0eefb46ac2a16b24dc3f484c1d564b
parentbf6c04d342f258a0caf26291fb06d036c5c902a7 (diff)
downloadinitscripts-137302c545006f0c4e89616f1c0e6cc2a7294969.tar.xz
Add special target for rc.conf DAEMONS
This (re)introduces arch-daemons.target, so a simple systemctl mask arch-daemons.target will suppress the starting of DAEMONS from rc.conf. Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
-rw-r--r--Makefile3
-rwxr-xr-xarch-daemons6
-rw-r--r--arch-daemons.target2
3 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index ac307e2..5829fd9 100644
--- a/Makefile
+++ b/Makefile
@@ -35,12 +35,13 @@ install: installdirs doc
install -m644 -t $(DESTDIR)/usr/share/man/man8 rc.d.8 arch-modules-load.8 arch-daemons.8
install -m755 -t $(DESTDIR)/usr/lib/systemd/system-generators arch-daemons
install -m755 -t $(DESTDIR)/usr/lib/systemd arch-modules-load
- install -m644 -t $(DESTDIR)/usr/lib/systemd/system arch-modules-load.service rc-local.service rc-local-shutdown.service
+ install -m644 -t $(DESTDIR)/usr/lib/systemd/system arch-modules-load.service rc-local.service rc-local-shutdown.service arch-daemons.target
install -m644 tmpfiles.conf $(DESTDIR)/usr/lib/tmpfiles.d/initscripts.conf
install -m644 -T bash-completion $(DESTDIR)/usr/share/bash-completion/completions/rc.d
install -m644 -T zsh-completion $(DESTDIR)/usr/share/zsh/site-functions/_rc.d
ln -s /dev/null ${DESTDIR}/usr/lib/systemd/system/netfs.service
ln -s ../rc-local.service ${DESTDIR}/usr/lib/systemd/system/multi-user.target.wants/
+ ln -s ../arch-daemons.target ${DESTDIR}/usr/lib/systemd/system/multi-user.target.wants/
ln -s ../rc-local-shutdown.service ${DESTDIR}/usr/lib/systemd/system/shutdown.target.wants/
ln -s ../arch-modules-load.service ${DESTDIR}/usr/lib/systemd/system/sysinit.target.wants/
diff --git a/arch-daemons b/arch-daemons
index edb4dcb..b4398b4 100755
--- a/arch-daemons
+++ b/arch-daemons
@@ -47,18 +47,18 @@ for daemon in /etc/rc.d/*; do
create_unit "${daemon##*/}".service
done
-[[ -d $dest/multi-user.target.wants ]] || /bin/mkdir -p "$dest/multi-user.target.wants"
+[[ -d $dest/arch-daemons.target.wants ]] || /bin/mkdir -p "$dest/arch-daemons.target.wants"
for daemon in "${DAEMONS[@]}"; do
service="$daemon.service"
case ${daemon:0:1} in
'!') continue ;;
'@') create_unit "${service:1}" "${deps[@]}"
- ln -s "../${service:1}" "$dest/multi-user.target.wants"
+ ln -s "../${service:1}" "$dest/arch-daemons.target.wants"
;;
*) create_unit "$service" "${deps[@]}"
deps+=("$service")
- ln -s "../$service" "$dest/multi-user.target.wants"
+ ln -s "../$service" "$dest/arch-daemons.target.wants"
;;
esac
done
diff --git a/arch-daemons.target b/arch-daemons.target
new file mode 100644
index 0000000..3a8ba1d
--- /dev/null
+++ b/arch-daemons.target
@@ -0,0 +1,2 @@
+[Unit]
+Description=Arch Daemons