]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
aiccu: Add service file for systemd.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 14 Apr 2013 12:28:22 +0000 (14:28 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sun, 14 Apr 2013 12:28:22 +0000 (14:28 +0200)
Fixes #10348.

aiccu/aiccu.nm
aiccu/systemd/aiccu@.service [new file with mode: 0644]

index a879172aa8170f0e15b15ff2d48648f46502386c..a97fb4e6ce3dbae2e6a02f7e5cf7ff0555e73575 100644 (file)
@@ -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 (file)
index 0000000..38653a6
--- /dev/null
@@ -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