X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=distrib%2Finitscripts%2FMakefile.am;h=bcf1779c1a3fc95bc3c5400d1868d2bb9238cb80;hb=a21e48c564f646b3deb1e56d2b645c873f665a01;hp=4b88ba9d39f6ac37bc4195ff89f0b9459fcb951a;hpb=1c53fca8ff87c63383eec3249a479bd1f416f4dd;p=netatalk.git diff --git a/distrib/initscripts/Makefile.am b/distrib/initscripts/Makefile.am index 4b88ba9d..bcf1779c 100644 --- a/distrib/initscripts/Makefile.am +++ b/distrib/initscripts/Makefile.am @@ -13,6 +13,7 @@ pkgconfdir = @PKGCONFDIR@ -e s@:SBINDIR:@${sbindir}@ \ -e s@:ETCDIR:@${pkgconfdir}@ \ -e s@:NETATALK_VERSION:@${NETATALK_VERSION}@ \ + -e s@:PATH_NETATALK_LOCK:@${PATH_NETATALK_LOCK}@ \ <$< >$@ GENERATED_FILES = \ @@ -39,6 +40,7 @@ TEMPLATES = \ CLEANFILES = $(GENERATED_FILES) $(sysv_SCRIPTS) $(service_DATA) afpd cnid_metad EXTRA_DIST = $(TEMPLATES) +noinst_DATA = $(GENERATED_FILES) # overwrite automake uninstall # not beautiful, but this way we can call the OS specific init script @@ -52,7 +54,7 @@ uninstall: uninstall-startup if USE_REDHAT_SYSV -sysvdir = /etc/rc.d/init.d +sysvdir = $(INIT_DIR) sysv_SCRIPTS = netatalk $(sysv_SCRIPTS): rc.redhat @@ -74,7 +76,29 @@ endif if USE_SYSTEMD -servicedir = /lib/systemd/system +servicedir = $(INIT_DIR) +service_DATA = netatalk.service + +netatalk.service: service.systemd + cp -f service.systemd netatalk.service + +install-data-hook: + -systemctl daemon-reload + +uninstall-startup: + -systemctl disable $(service_DATA) + rm -f $(DESTDIR)$(servicedir)/netatalk.service + -systemctl daemon-reload + +endif + +# +# checking for "Debian" style systemd scripts: +# + +if USE_DEBIAN_SYSTEMD + +servicedir = $(INIT_DIR) service_DATA = netatalk.service netatalk.service: service.systemd @@ -96,7 +120,7 @@ endif if USE_SUSE_SYSV -sysvdir = /etc/init.d +sysvdir = $(INIT_DIR) sysv_SCRIPTS = netatalk $(sysv_SCRIPTS): rc.suse @@ -118,7 +142,7 @@ endif if USE_NETBSD -sysvdir = /etc/rc.d +sysvdir = $(INIT_DIR) sysv_SCRIPTS = netatalk netatalk: rc.netbsd @@ -139,7 +163,7 @@ endif if USE_SOLARIS -servicedir = /lib/svc/manifest/network/ +servicedir = $(INIT_DIR) service_DATA = netatalk.xml install-data-hook: @@ -156,7 +180,7 @@ endif if USE_GENTOO -sysvdir = /etc/init.d +sysvdir = $(INIT_DIR) sysv_SCRIPTS = netatalk $(sysv_SCRIPTS): rc.gentoo @@ -176,9 +200,9 @@ endif # checking for "Debian" style sysv scripts: # -if USE_DEBIAN +if USE_DEBIAN_SYSV -sysvdir = /etc/init.d +sysvdir = $(INIT_DIR) sysv_SCRIPTS = netatalk $(sysv_SCRIPTS): rc.debian