From a21e48c564f646b3deb1e56d2b645c873f665a01 Mon Sep 17 00:00:00 2001 From: HAT Date: Sat, 23 Aug 2014 02:40:07 +0900 Subject: [PATCH] NEW: configure option "--with-init-style=debian-systemd" for Debian 8 jessieand later "--with-init-style=debian" is renamed "--with-init-style=debian-sysv". NOTE: service dir is /lib/systemd/system, not /usr/lib/systemd/system. --- NEWS | 2 ++ config/Makefile.am | 2 +- distrib/initscripts/Makefile.am | 24 +++++++++++++++++++++++- doc/manual/install.xml | 4 ++-- macros/netatalk.m4 | 14 +++++++++++--- 5 files changed, 39 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index a16a37af..a306a1e9 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,8 @@ Changes in 3.1.6 * UPD: afpd: distribute SIGHUP from parent afpd to children and force reload shares * FIX: netatalk: refresh Zeroconf registration when receiving SIGHUP +* NEW: configure option "--with-init-style=debian-systemd" for Debian 8 jessieand later. + "--with-init-style=debian" is renamed "--with-init-style=debian-sysv". Changes in 3.1.5 ================ diff --git a/config/Makefile.am b/config/Makefile.am index 5003de1b..c98a2abb 100644 --- a/config/Makefile.am +++ b/config/Makefile.am @@ -49,7 +49,7 @@ uninstall-local: rm -f $(DESTDIR)$(pkgconfdir)/dbus-session.conf rm -f $(DESTDIR)$(localstatedir)/netatalk/README rm -f $(DESTDIR)$(localstatedir)/netatalk/CNID/README -if USE_DEBIAN +if USE_DEBIAN_SYSV rm -f $(DESTDIR)/etc/default/netatalk endif diff --git a/distrib/initscripts/Makefile.am b/distrib/initscripts/Makefile.am index 79dcfb3f..bcf1779c 100644 --- a/distrib/initscripts/Makefile.am +++ b/distrib/initscripts/Makefile.am @@ -92,6 +92,28 @@ uninstall-startup: endif +# +# checking for "Debian" style systemd scripts: +# + +if USE_DEBIAN_SYSTEMD + +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 "SuSE" style sysv scripts: # @@ -178,7 +200,7 @@ endif # checking for "Debian" style sysv scripts: # -if USE_DEBIAN +if USE_DEBIAN_SYSV sysvdir = $(INIT_DIR) sysv_SCRIPTS = netatalk diff --git a/doc/manual/install.xml b/doc/manual/install.xml index 74de545b..1974d07a 100644 --- a/doc/manual/install.xml +++ b/doc/manual/install.xml @@ -1,7 +1,7 @@ - 4.8.2013 + 22.8.2014 Installation @@ -270,7 +270,7 @@ remote: Counting objects: 2503, done. - =redhat-sysv|redhat-systemd|suse-sysv|suse-systemd|gentoo|netbsd|debian|solaris|systemd + =redhat-sysv|redhat-systemd|suse-sysv|suse-systemd|gentoo|netbsd|debian-sysv|debian-systemd|solaris|systemd This option helps netatalk to determine where to install the start scripts. diff --git a/macros/netatalk.m4 b/macros/netatalk.m4 index 55712be0..ea2bbffe 100644 --- a/macros/netatalk.m4 +++ b/macros/netatalk.m4 @@ -480,7 +480,7 @@ AC_ARG_ENABLE(shell-check, dnl Check for optional initscript install AC_DEFUN([AC_NETATALK_INIT_STYLE], [ AC_ARG_WITH(init-style, - [ --with-init-style use OS specific init config [[redhat-sysv|redhat-systemd|suse-sysv|suse-systemd|gentoo|netbsd|debian|solaris|systemd]]], + [ --with-init-style use OS specific init config [[redhat-sysv|redhat-systemd|suse-sysv|suse-systemd|gentoo|netbsd|debian-sysv|debian-systemd|solaris|systemd]]], init_style="$withval", init_style=none ) case "$init_style" in @@ -515,9 +515,16 @@ AC_DEFUN([AC_NETATALK_INIT_STYLE], [ ac_cv_init_dir="/etc/rc.d" ;; "debian") - AC_MSG_RESULT([enabling debian-style initscript support]) + AC_MSG_ERROR([--with-init-style=debian is obsoleted. Use debian-sysv or debian-systemd.]) + ;; + "debian-sysv") + AC_MSG_RESULT([enabling debian-style sysv initscript support]) ac_cv_init_dir="/etc/init.d" ;; + "debian-systemd") + AC_MSG_RESULT([enabling debian-style systemd support]) + ac_cv_init_dir="/lib/systemd/system" + ;; "solaris") AC_MSG_RESULT([enabling solaris-style SMF support]) ac_cv_init_dir="/lib/svc/manifest/network/" @@ -539,8 +546,9 @@ AC_DEFUN([AC_NETATALK_INIT_STYLE], [ AM_CONDITIONAL(USE_SUSE_SYSV, test x$init_style = xsuse-sysv) AM_CONDITIONAL(USE_SOLARIS, test x$init_style = xsolaris) AM_CONDITIONAL(USE_GENTOO, test x$init_style = xgentoo) - AM_CONDITIONAL(USE_DEBIAN, test x$init_style = xdebian) + AM_CONDITIONAL(USE_DEBIAN_SYSV, test x$init_style = xdebian-sysv) AM_CONDITIONAL(USE_SYSTEMD, test x$init_style = xsystemd || test x$init_style = xredhat-systemd || test x$init_style = xsuse-systemd) + AM_CONDITIONAL(USE_DEBIAN_SYSTEMD, test x$init_style = xdebian-systemd) AM_CONDITIONAL(USE_UNDEF, test x$init_style = xnone) AC_ARG_WITH(init-dir, -- 2.39.2