/[gentoo-x86]/net-misc/aiccu/files/aiccu-2007.01.15-systemd.patch
Gentoo

Contents of /net-misc/aiccu/files/aiccu-2007.01.15-systemd.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed Jul 16 18:04:53 2014 UTC (2 months, 2 weeks ago) by pacho
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
Fix systemd linking (#502448 by Jonathan Callen), drop old

(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)

1 --- /dev/null
2 +++ aiccu-2007.01.15/doc/aiccu.service
3 @@ -0,0 +1,13 @@
4 +[Unit]
5 +Description=Automatic IPv6 Connectivity Client Utility
6 +After=time-sync.target network.target
7 +ConditionPathExists=/etc/aiccu.conf
8 +
9 +
10 +[Service]
11 +Type=notify
12 +ExecStart=/usr/sbin/aiccu start
13 +ExecStop=/usr/sbin/aiccu stop
14 +
15 +[Install]
16 +WantedBy=multi-user.target
17 --- aiccu-2007.01.15/unix-console/Makefile
18 +++ aiccu-2007.01.15/unix-console/Makefile
19 @@ -48,6 +48,10 @@ ifeq ($(shell uname | grep -c "Linux"),1)
20 SRCS += ../common/aiccu_linux.c
21 OBJS += ../common/aiccu_linux.o
22 LIBS += -lpthread -lresolv
23 +ifeq (1,$(HAVE_SYSTEMD))
24 +LIBS += $(shell pkg-config --libs libsystemd 2>/dev/null || pkg-config --libs libsystemd-daemon)
25 +CFLAGS += -DHAVE_SYSTEMD
26 +endif
27 endif
28
29 # FreeBSD
30 --- aiccu-2007.01.15/unix-console/main.c
31 +++ aiccu-2007.01.15/unix-console/main.c
32 @@ -12,6 +12,9 @@
33
34 #include "../common/aiccu.h"
35 #include "../common/tun.h"
36 +#ifdef HAVE_SYSTEMD
37 +#include <systemd/sd-daemon.h>
38 +#endif
39
40 #ifndef _WIN32
41 /* Enable/Disable heartbeating */
42 @@ -478,6 +481,10 @@ int main(int argc, char *argv[])
43 aiccu_exec("%s", g_aiccu->setupscript);
44 }
45
46 +#ifdef HAVE_SYSTEMD
47 + /* Tell systemd we are operational. */
48 + sd_notify(0, "READY=1");
49 +#endif
50
51 /* We need to stay running when doing Heartbeat or AYIYA */
52 if ( strcasecmp(hTunnel->sType, "6in4-heartbeat") == 0 ||

  ViewVC Help
Powered by ViewVC 1.1.20