]> git.pld-linux.org Git - packages/netatalk.git/commitdiff
- rewritten SysV script and descriptions for netatalk 3:
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 17 Jan 2015 19:33:22 +0000 (20:33 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 17 Jan 2015 19:33:22 +0000 (20:33 +0100)
  legacy AppleTalk protocol is no longer supported, now AFP is

netatalk.init
netatalk.spec

index 4fd4578f4ebb6d4e73870666addcbb4852b154e6..b5eef58df783b6893cee0e422a735288a4fa86c4 100644 (file)
@@ -1,13 +1,13 @@
-#! /bin/sh
+#!/bin/sh
+#
+# netatalk     Netatalk AFP server service controller daemon
+#
 # chkconfig:   345 91 35
-# description: This package enables Linux to talk to Macintosh \
-#              computers via the AppleTalk networking protocol and \
-#              provides printer, file sharing, and AppleTalk routing \
-#              services. 
 #
-# AppleTalk daemons. Make sure not to start atalkd in the background:
-# its data structures must have time to stablize before running the
-# other processes.
+# description: netatalk is the service controller daemon \
+#              responsible for starting and restarting the AFP daemon \
+#              afpd and the CNID daemon cnid_metad.
+#
 
 # Source function library.
 . /etc/rc.d/init.d/functions
 # Source networking configuration.
 . /etc/sysconfig/network
 
-# Quickly probe for appletalk and warn if we can't find it
-/sbin/modprobe appletalk || echo "[could not load appletalk module]"
-
-# Check for IP Encapsulation support
-#/sbin/modprobe ipddp || echo "[could not load IP encapsulation]"
-
 # read in netatalk configuration
 . /etc/sysconfig/netatalk
 
@@ -28,7 +22,7 @@
 if is_yes "${NETWORKING}"; then
        if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
                # nls "ERROR: Networking is down. %s can't be run." <service>
-               msg_network_down "AppleTalk"
+               msg_network_down "netatalk"
                exit 1
        fi
 else
@@ -37,111 +31,77 @@ fi
 
 # initialize return values
 RETVAL=1
-RETVAL_ATALKD=0
-RETVAL_PAPD=0
-RETVAL_AFPD=0
 
 start() {
-       if [ -f /var/lock/subsys/atalk ]; then
-               msg_already_running "AppleTalk"
+       if [ -f /var/lock/subsys/netatalk ]; then
+               msg_already_running "netatalk"
                exit 0
        fi
 
-       if is_yes "${ATALKD_RUN}"; then 
-               msg_starting "atalkd"
-               daemon atalkd
-               RETVAL_ATALKD=$?
-               run_cmd -a "$(nls "Registering %s" "${ATALK_NAME}:Workstation${ATALK_ZONE}:")" "nbprgstr -p 4 \"${ATALK_NAME}:Workstation${ATALK_ZONE}\""
-               run_cmd -a "$(nls "Registering %s" "${ATALK_NAME}:netatalk${ATALK_ZONE}:")" "nbprgstr -p 4 \"${ATALK_NAME}:netatalk${ATALK_ZONE}\""
-               if is_yes "${PAPD_RUN}"; then
-                       msg_starting "papd"
-                       daemon papd
-                       RETVAL_PAPD=$?
-               fi
-       fi
-
-       if is_yes "${TIMELORD_RUN}"; then
-               msg_starting "timelord"
-               daemon timelord
-       fi
-
-       if is_yes "${AFPD_RUN}"; then
-               msg_starting "afpd"
-               daemon afpd ${AFPD_UAMLIST} -g ${AFPD_GUEST} -c ${AFPD_MAX_CLIENTS} -n \"${ATALK_NAME}${ATALK_ZONE}\"
-               RETVAL_AFPD=$?
-       fi
-
-       if [ "$RETVAL_ATALKD" -eq 0 -a "$RETVAL_PAPD" -eq 0 -a "$RETVAL_AFPD" -eq 0 ]; then
-               RETVAL=0
-               touch /var/lock/subsys/atalk || RETVAL=1
-       fi
+       msg_starting "atalkd"
+       daemon /usr/sbin/netatalk
+       RETVAL=$?
+       [ $RETVAL -eq 0 ] && touch /var/lock/subsys/netatalk
 }
 
 stop() {
-       if [ ! -f /var/lock/subsys/atalk ]; then
-               msg_not_running "AppleTalk"
+       if [ ! -f /var/lock/subsys/netatalk ]; then
+               msg_not_running "netatalk"
                exit 0
        fi
 
-       if is_yes "${ATALKD_RUN}"; then
-               if is_yes "${PAPD_RUN}"; then
-                       msg_stopping "papd"
-                       killproc papd
-               fi
+       msg_stopping "netatalk"
+       killproc netatalk
+       rm -f /var/lock/subsys/netatalk
+}
 
-               if is_yes "${TIMELORD_RUN}"; then
-                       msg_stopping "timelord"
-                       killproc timelord
-               fi
+reload() {
+       if [ ! -f /var/lock/subsys/netatalk ]; then
+               msg_not_running "netatalk"
+               RETVAL=7
+               return
+       fi
 
-               run_cmd "$(nls "Unregistering %s" "${ATALK_NAME}:Workstation${ATALK_ZONE}:")" "nbpunrgstr \"${ATALK_NAME}:Workstation${ATALK_ZONE}\""
-               run_cmd "$(nls "Unregistering %s" "${ATALK_NAME}:netatalk${ATALK_ZONE}:")" "nbpunrgstr \"${ATALK_NAME}:netatalk${ATALK_ZONE}\""
+       msg_reloading "netatalk"
+       killproc netatalk -HUP
+       RETVAL=$?
+}
 
-               msg_stopping "atalk"
-               killproc atalkd
+condrestart() {
+       if [ ! -f /var/lock/subsys/netatalk ]; then
+               msg_not_running "netatalk"
+               RETVAL=$1
+               return
        fi
 
-       if  is_yes "${AFPD_RUN}"; then
-               msg_stopping "afpd"
-               killproc afpd
-       fi
-       rm -f /var/lock/subsys/atalk >/dev/null 2>&1
+       stop
+       start
 }
 
 RETVAL=0
-# startup code for everything
 case "$1" in
   start)
        start
        ;;
-
   stop)
        stop
        ;;
-  restart|force-reload)
+  restart)
        stop
        start
        ;;
+  try-restart)
+       condrestart 0
+       ;;
+  reload|force-reload)
+       reload
+       ;;
   status)
-       if is_yes "${ATALKD_RUN}"; then 
-           if is_yes "${PAPD_RUN}"; then
-               status papd
-           fi
-           
-           if is_yes "${TIMELORD_RUN}"; then
-               status timelord
-           fi
-           
-           if  is_yes "${AFPD_RUN}"; then
-               status afpd
-           fi
-           status atalkd
-           nbplkup ${ATALK_NAME}
-       fi
-       exit $?
+       status netatalk
+       RETVAL=$?
        ;;
   *)
-       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"
        exit 3
 esac
 
index d823ddef17d7d12e7c579e5e8d237e1f5af36731..7ee6637ad491f6082df1346e8fc42698d9f80794 100644 (file)
@@ -1,14 +1,13 @@
 # TODO: AFS support?
+# system talloc
 #
 # Conditional build:
 %bcond_without kerberos5       # Kerberos V UAM
 %bcond_without systemtap       # SystemTap/DTrace support
 %bcond_without tracker         # Spotlight support via tracker
 #
-Summary:       AppleTalk networking programs
-Summary(pl.UTF-8):     Klient i serwer AppleTalk
-Summary(pt_BR.UTF-8):  Programas para rede AppleTalk
-Summary(zh_CN.UTF-8):  AppleTalk 和 Appleshare/IP 服务工具
+Summary:       Netatalk AFP fileserver for Apple clients
+Summary(pl.UTF-8):     Netatalk - serwer plików AFP dla klientów Apple
 Name:          netatalk
 Version:       3.1.7
 Release:       2
@@ -66,36 +65,32 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                _localstatedir  /var/lib
 
 %description
-This package enables Linux to talk to Macintosh computers via the
-AppleTalk networking protocol. It includes a daemon to allow Linux to
-act as a file server over EtherTalk or IP for Mac's.
+Netatalk is a freely-available Open Source AFP fileserver. A *NIX/*BSD
+system running Netatalk is capable of serving many Apple clients
+simultaneously as an AppleShare file server (AFP).
 
 %description -l pl.UTF-8
-Pakiet ten pozwala na komunikację Linuksa z komputerami Macintosh za
-pośrednictwem protokołu AppleTalk. Zawiera demona umożliwiającego, aby
-Linux służył jako serwer plików poprzez EtherTalk lub IP dla klientów
-Mac.
-
-%description -l pt_BR.UTF-8
-Este pacote habilita o Linux a servir computadores Macintosh através
-do protocolo AppleTalk.
+Netatalk to wolnodostępny, mający otwarte źródła serwer plików oparty
+na protokole AFP. System uniksowy z działającym Netatalkiem potrafi
+serwować wielu klientom Apple jednocześnie jako serwer plików
+AppleShare (AFP).
 
 %package libs
-Summary:       AppleTalk shared library
-Summary(pl.UTF-8):     Biblioteka współdzielona AppleTalk
+Summary:       Netatalk shared library
+Summary(pl.UTF-8):     Biblioteka współdzielona Netatalk
 Group:         Libraries
 Conflicts:     netatalk < 2:3.1.7-2
 
 %description libs
-AppleTalk shared library.
+Netatalk shared library.
 
 %description libs -l pl.UTF-8
-Biblioteka współdzielona AppleTalk.
+Biblioteka współdzielona Netatalk.
 
 %package devel
-Summary:       Header files for AppleTalk development
-Summary(pl.UTF-8):     Pliki nagłówkowe AppleTalk
-Summary(pt_BR.UTF-8):  Arquivos de inclusão para o desenvolvimento de aplicativos baseados no protocolo AppleTalk
+Summary:       Header files for Netatalk development
+Summary(pl.UTF-8):     Pliki nagłówkowe Netatalk
+Summary(pt_BR.UTF-8):  Arquivos de inclusão para o desenvolvimento de aplicativos baseados no protocolo Netatalk
 Group:         Development/Libraries
 Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
 Requires:      acl-devel
@@ -109,28 +104,28 @@ Requires: pam-devel
 Requires:      tdb-devel
 
 %description devel
-This packge contains the header files for building AppleTalk
+This packge contains the header files for building Netatalk
 networking programs.
 
 %description devel -l pl.UTF-8
 Ten pakiet zawiera pliki nagłówkowe do tworzenia oprogramowania
-wykorzystującego protokół AppleTalk.
+wykorzystującego protokół Netatalk.
 
 %description devel -l pt_BR.UTF-8
 Arquivos de inclusão para o desenvolvimento de aplicativos baseados no
-protocolo AppleTalk.
+protocolo Netatalk.
 
 %package static
-Summary:       Static AppleTalk library
-Summary(pl.UTF-8):     Statyczna biblioteka AppleTalk
+Summary:       Static Netatalk library
+Summary(pl.UTF-8):     Statyczna biblioteka Netatalk
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{epoch}:%{version}-%{release}
 
 %description static
-Static AppleTalk library.
+Static Netatalk library.
 
 %description static -l pl.UTF-8
-Statyczna biblioteka AppleTalk.
+Statyczna biblioteka Netatalk.
 
 %prep
 %setup -q
@@ -160,9 +155,10 @@ Statyczna biblioteka AppleTalk.
        --with-pkgconfdir=%{_sysconfdir}/atalk \
        --with-uams-path=%{_libdir}/atalk \
        --with-cracklib=%{_datadir}/dict/cracklib_dict \
+       --with-docbook=%{_datadir}/sgml/docbook/xsl-stylesheets \
        %{!?with_systemtap:--without-dtrace} \
        --with-init-style=debian-systemd \
-       --with-libevent=%{_libdir} \
+       --with-libevent-lib=%{_libdir} \
        --with-pam \
        --with-shadow \
        --with-ssl \
This page took 0.16142 seconds and 4 git commands to generate.