From 75203eee9d91d687d27c6bb6958b52a799ba04ff Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Sun, 14 Apr 2013 14:28:22 +0200 Subject: [PATCH] aiccu: Add service file for systemd. Fixes #10348. --- aiccu/aiccu.nm | 21 ++++++++++++++++----- aiccu/systemd/aiccu@.service | 17 +++++++++++++++++ 2 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 aiccu/systemd/aiccu@.service diff --git a/aiccu/aiccu.nm b/aiccu/aiccu.nm index a879172aa..a97fb4e6c 100644 --- a/aiccu/aiccu.nm +++ b/aiccu/aiccu.nm @@ -5,7 +5,7 @@ name = aiccu version = 20070115 -release = 1 +release = 2 groups = System/Daemons url = http://www.sixxs.net/tools/aiccu/ @@ -19,6 +19,7 @@ description end source_dl = http://www.sixxs.net/archive/sixxs/aiccu/unix/ +sources = %{name}_%{version}.tar.gz build requires @@ -27,11 +28,10 @@ build DIR_APP = %{DIR_SRC}/%{name} - build - %{DO_FIX_LIBTOOL} - make %{PARALLELISMFLAGS} RPM_OPT_FLAGS="%{CFLAGS}" - end + make_build_targets += \ + RPM_OPT_FLAGS="%{CFLAGS}" + # Remove old sysvinit stuff and emtpy usr/share directory. install_cmds rm -rvf %{BUILDROOT}/{etc,usr/share} end @@ -39,6 +39,17 @@ end packages package %{name} + script postin + systemctl daemon-reload >/dev/null 2>&1 || : + end + + script postup + systemctl daemon-reload >/dev/null 2>&1 || : + end + + script postun + systemctl daemon-reload >/dev/null 2>&1 || : + end end package %{name}-debuginfo diff --git a/aiccu/systemd/aiccu@.service b/aiccu/systemd/aiccu@.service new file mode 100644 index 000000000..38653a626 --- /dev/null +++ b/aiccu/systemd/aiccu@.service @@ -0,0 +1,17 @@ +[Unit] +Description=AICCU (Automatic IPv6 Connectivity Configuration Utility) on %I + +[Service] +ExecStartPre=/usr/lib/network/helpers/aiccu-config-helper create %I +ExecStart=/usr/sbin/aiccu start /run/network/%I/aiccu.conf +ExecStop=/usr/sbin/aiccu stop /run/network/%I/aiccu.conf +ExecStopPost=/usr/lib/network/helpers/aiccu-config-helper remove %I + +UtmpIdentifier=%I + +# WARNING: never run AICCU from DaemonTools or a similar automated +# 'restart' tool/script. When AICCU does not start, it has a reason +# not to start which it gives on either the stdout or in the (sys)log +# file. The TIC server *will* automatically disable accounts which +# are detected to run in this mode. +Restart=no -- 2.47.3