]> arthur.barton.de Git - netatalk.git/commitdiff
NEW: configure option "--with-init-style=debian-systemd" for Debian 8 jessieand later
authorHAT <hat@fa2.so-net.ne.jp>
Fri, 22 Aug 2014 17:40:07 +0000 (02:40 +0900)
committerHAT <hat@fa2.so-net.ne.jp>
Fri, 22 Aug 2014 17:40:07 +0000 (02:40 +0900)
"--with-init-style=debian" is renamed "--with-init-style=debian-sysv".
NOTE: service dir is /lib/systemd/system, not /usr/lib/systemd/system.

NEWS
config/Makefile.am
distrib/initscripts/Makefile.am
doc/manual/install.xml
macros/netatalk.m4

diff --git a/NEWS b/NEWS
index a16a37afcf17af17f50f9213ed18968ce51223fe..a306a1e9d5306866e0d695ff5d04582fc72254e2 100644 (file)
--- 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
 ================
index 5003de1b8b9fab7623558883244091a74f463073..c98a2abb7592f6c58c7a456a4165bd1baed0dbc7 100644 (file)
@@ -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
 
index 79dcfb3f283179abfcfb342ff095881577113c18..bcf1779c1a3fc95bc3c5400d1868d2bb9238cb80 100644 (file)
@@ -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
index 74de545b0e15b783bb3547c68504cba6657ea905..1974d07a59ae9c715a5289aa89f4d771b505239b 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <chapter id="installation">
   <chapterinfo>
-    <date>4.8.2013</date>
+    <date>22.8.2014</date>
   </chapterinfo>
 
   <title>Installation</title>
@@ -270,7 +270,7 @@ remote: Counting objects: 2503, done.
 
         <itemizedlist>
           <listitem>
-            <para><option>--with-init-style</option>=redhat-sysv|redhat-systemd|suse-sysv|suse-systemd|gentoo|netbsd|debian|solaris|systemd</para>
+            <para><option>--with-init-style</option>=redhat-sysv|redhat-systemd|suse-sysv|suse-systemd|gentoo|netbsd|debian-sysv|debian-systemd|solaris|systemd</para>
 
             <para>This option helps netatalk to determine where to install the
             start scripts.</para>
index 55712be012a5336e16b0fd89ffad8a8bb444975b..ea2bbffe47dfa4b04e90ca31ad731395059ce445 100644 (file)
@@ -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,