[arch-projects] [initscripts] [PATCH 1/2] Add special target for rc.conf DAEMONS
Tom Gundersen
teg at jklm.no
Sun Aug 19 05:28:52 EDT 2012
Logs good. I am in the middle of moving at the moment, so might be a few
days before I look into this properly.
On Aug 18, 2012 10:07 AM, "Jan Alexander Steffens (heftig)" <
jan.steffens at gmail.com> wrote:
> From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
>
> 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 at gmail.com>
> ---
> Makefile | 3 ++-
> arch-daemons | 6 +++---
> arch-daemons.target | 2 ++
> 3 files changed, 7 insertions(+), 4 deletions(-)
> create mode 100644 arch-daemons.target
>
> 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
> --
> 1.7.11.5
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.archlinux.org/pipermail/arch-projects/attachments/20120819/02913769/attachment-0001.html>
More information about the arch-projects
mailing list