Support the execution of avahi-autoipd directly from systemd. Signed-off-by: Josh Cartwright <josh.cartwri...@ni.com> --- avahi-autoipd/Makefile.am | 24 +++++++++++++++++++++--- avahi-autoipd/avahi-auto...@.service.in | 27 +++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 avahi-autoipd/avahi-auto...@.service.in
diff --git a/avahi-autoipd/Makefile.am b/avahi-autoipd/Makefile.am index 56f7a35..61d9dc1 100644 --- a/avahi-autoipd/Makefile.am +++ b/avahi-autoipd/Makefile.am @@ -48,6 +48,15 @@ else avahi_autoipd_SOURCES += iface-linux.c endif +%.service: %.service.in + $(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ + +if HAVE_SYSTEMD +systemdsystemunit_DATA = \ + avahi-autoipd@.service +endif + + nodist_pkgsysconf_SCRIPTS = avahi-autoipd.action if TARGET_FREEBSD @@ -89,6 +98,15 @@ endif endif endif -EXTRA_DIST = dhclient-enter-hook.in dhclient-exit-hook.in avahi-autoipd.action.linux avahi-autoipd.action.bsd - -CLEANFILES = dhclient-enter-hook dhclient-exit-hook avahi-autoipd.action +EXTRA_DIST = \ + dhclient-enter-hook.in \ + dhclient-exit-hook.in \ + avahi-autoipd.action.linux \ + avahi-autoipd.action.bsd \ + avahi-autoipd@.service + +CLEANFILES = \ + dhclient-enter-hook \ + dhclient-exit-hook \ + avahi-autoipd.action \ + $(systemdsystemunit_DATA) diff --git a/avahi-autoipd/avahi-auto...@.service.in b/avahi-autoipd/avahi-auto...@.service.in new file mode 100644 index 0000000..32f4bda --- /dev/null +++ b/avahi-autoipd/avahi-auto...@.service.in @@ -0,0 +1,27 @@ +# This file is part of avahi. +# +# avahi is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# avahi is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with avahi; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA. + +[Unit] +Description=Avahi IPv4LL network address configuration daemon + +[Service] +ExecStart=@sbindir@/avahi-autoipd %I +ExecReload=@sbindir@/avahi-autoipd --refresh %I +ExecStop=@sbindir@/avahi-autoipd --kill %I + +[Install] +WantedBy=network.target -- 1.8.1.2 _______________________________________________ avahi mailing list avahi@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/avahi