]> arthur.barton.de Git - netatalk.git/commitdiff
Merge remote branch 'sf/master'
authorFrank Lahm <franklahm@googlemail.com>
Wed, 31 Aug 2011 06:08:59 +0000 (08:08 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Wed, 31 Aug 2011 06:08:59 +0000 (08:08 +0200)
20 files changed:
bin/afile/.gitignore [deleted file]
contrib/macusers/macusers.in
contrib/shell_utils/apple_dump.in
contrib/shell_utils/asip-status.pl.in
distrib/initscripts/Makefile.am
distrib/initscripts/rc.afpd.netbsd.tmpl
distrib/initscripts/rc.atalk.bsd.tmpl
distrib/initscripts/rc.atalk.debian.tmpl
distrib/initscripts/rc.atalk.gentoo.tmpl
distrib/initscripts/rc.atalk.redhat-systemd.tmpl
distrib/initscripts/rc.atalk.redhat-sysv.tmpl
distrib/initscripts/rc.atalk.suse.tmpl
distrib/initscripts/rc.atalk.sysv.tmpl
distrib/initscripts/rc.atalk.tru64.tmpl
distrib/initscripts/rc.atalkd.netbsd.tmpl
distrib/initscripts/rc.cnid_metad.netbsd.tmpl
distrib/initscripts/rc.papd.netbsd.tmpl
distrib/initscripts/rc.timelord.netbsd.tmpl
distrib/initscripts/service.atalk.redhat-systemd.tmpl
macros/summary.m4

diff --git a/bin/afile/.gitignore b/bin/afile/.gitignore
deleted file mode 100644 (file)
index 5050c88..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Makefile
-Makefile.in
-achfile
-afile
-.deps
-.libs
-.gitignore
-achfile.o afile.o common.o
index 75ddb5c4366e41eb78b2e0d432a9209ae5a06470..b37955512118e7164e9f379ba1d5260e1074dc23 100644 (file)
@@ -2,6 +2,7 @@
 
 use strict;
 use Socket;
+use File::Basename;
 use vars qw($MAC_PROCESS $PS_STR $MATCH_STR $ASIP_PORT_NO $ASIP_PORT $LSOF);
 
 # Written for linux; may have to be modified for your brand of Unix.
@@ -9,6 +10,15 @@ use vars qw($MAC_PROCESS $PS_STR $MATCH_STR $ASIP_PORT_NO $ASIP_PORT $LSOF);
 # Support Solaris added by Frank Lahm <franklahm@googlemail.com>.
 # Support has also been added for 16 character usernames.
 
+if ($ARGV[0] =~ /^(-v|-version|--version)$/ ) {
+        printf ("%s \(Netatalk @NETATALK_VERSION@\)\n", basename($0));
+        exit(1);
+} elsif ($ARGV[0] =~ /^(-h|-help|--help)$/ ) {
+        printf ("usage: %s \[-v|-version|--version|-h|-help|--help\]\n", basename($0));
+        printf ("Show users connecting via AFP\n");
+        exit(1);
+}
+
 $MAC_PROCESS = "afpd";
 if ($^O eq "freebsd" || $^O eq "openbsd") {
         $PS_STR    = "-awwxouser,pid,ppid,start,command";
index 33058cd0b7c68f812bfdbfedb5a14c7a39a05157..65eec7908e0b4ea2c61e5f52308a1c2b5f537a13 100755 (executable)
@@ -56,10 +56,11 @@ $finderinfo = 0;              #  0: unknown   1: file   2: directory
 while ($arg = shift @ARGV)
 {
     if  ($arg =~ /^(-h|-help|--help)$/ ) {
-        printf ("usage: %s [-a] FILE|DIR\n"     ,basename($0));
-        printf (" or:   %s -f FILE\n"           ,basename($0));
-        printf (" or:   %s -d FILE\n"           ,basename($0));
-        printf (" or:   %s -h|-help|--help\n"   ,basename($0));
+        printf ("usage: %s [-a] FILE|DIR\n"           ,basename($0));
+        printf (" or:   %s -f FILE\n"                 ,basename($0));
+        printf (" or:   %s -d FILE\n"                 ,basename($0));
+        printf (" or:   %s -h|-help|--help\n"         ,basename($0));
+        printf (" or:   %s -v|-version|--version\n"   ,basename($0));
         printf ("Dump AppleSingle/AppleDouble format file.\n");
         printf ("\n");
         printf ("  -a (default)     Dump a AppleSingle/AppleDouble file for FILE or DIR\n");
@@ -71,6 +72,7 @@ while ($arg = shift @ARGV)
         printf ("  -f               Dump FILE. Assume FinderInfo to be FileInfo.\n");
         printf ("  -d               Dump FILE. Assume FinderInfo to be DirInfo.\n");
         printf ("  -h,-help,--help  Display this help and exit\n");
+        printf ("  -v,-version,--version  Show version and exit\n");
         printf ("\n");
         printf ("There is no way to detect whether FinderInfo is FileInfo or DirInfo.\n");
         printf ("By default, %s examins whether file or directory,\n"   ,basename($0));
@@ -78,7 +80,10 @@ while ($arg = shift @ARGV)
         printf ("and so on.\n");
         printf ("If setting option -f or -d, %s assume FinderInfo and doesn't look for\n");
         printf ("another file.\n");
-        exit 0;
+        exit 1;
+    } elsif ($arg =~ /^(-v|-version|--version)$/ ) {
+        printf ("%s \(Netatalk @NETATALK_VERSION@\)\n", basename($0));
+        exit 1;
     } elsif ($arg eq "-a") {
         $finderinfo = 0;
     } elsif ($arg eq "-f") {
index ccd0332edd6c4ccf7094a71d2a1e08f8f743a9e4..4fa260947ca9c059fb354350d8cd22c2b71a5c8c 100755 (executable)
@@ -16,7 +16,7 @@
 #
 
 #
-# This edition is a part of netatalk.
+# This edition is a part of netatalk @NETATALK_VERSION@.
 #
 
 use strict;
@@ -32,12 +32,29 @@ while ($arg = shift @ARGV)
        $main::show_icon = 1 if ($arg eq "-i");
        $main::debug = 1 if ($arg eq "-d");
        $main::hexdump = 1 if ($arg eq "-x");
+       $main::showver = 1 if ($arg eq "-v");
+       $main::showver = 1 if ($arg eq "-version");
+       $main::showver = 1 if ($arg eq "--version");
        $hostport = $arg if ($arg !~ /^-/);
 }
 
+if ($main::showver ==1)
+{
+        print "$0\n";
+        print "Original edition: 7 May 1997 \(v1.0\) James W. Abendschan\n";
+        print "This edition is a part of Netatalk @NETATALK_VERSION@\n";
+        exit(-1);
+}
+
 if ($hostport eq "")
 {
-       print "usage: $0 hostname[:port] [-i show icon] [-d debug] [-x hex dump]\n";
+       print "usage: $0 [-d] [-i] [-x] hostname[:port]\n";
+       print "       $0 -v|-version|--version\n";
+       print "Queries AFP servers for their capabilities.\n";
+       print "  -d: Enable debug output.\n";
+       print "  -i: Show icon if it exists.\n";
+       print "  -x: Enable hex dump output.\n";
+       print "  -v,-version,--version: Show version.\n";
        exit(-1);
 }
 
index 3ff9246b4b93542efdca39db4c76af3f3a1c3451..5d73af0b2f24059c9ec348c3c79c85140d6cf482 100644 (file)
@@ -13,6 +13,7 @@ pkgconfdir = @PKGCONFDIR@
            -e s@:SBINDIR:@${sbindir}@ \
            -e s@:ETCDIR:@${pkgconfdir}@ \
            -e s@:PKGLIBEXECDIR:@${pkglibexecdir}@ \
+           -e s@:NETATALK_VERSION:@${NETATALK_VERSION}@ \
            <$< >$@
 
 GENERATED_FILES = \
@@ -98,12 +99,13 @@ $(service_DATA): service.atalk.redhat-systemd
        cp -f service.atalk.redhat-systemd $(service_DATA)
 
 install-data-hook:
-       -systemctl enable $(sysv_SCRIPTS)
+       -systemctl daemon-reload
 
 uninstall-startup:
-       -systemctl disable $(sysv_SCRIPTS)
+       -systemctl disable $(service_DATA)
        rm -f $(DESTDIR)$(sysvdir)/$(sysv_SCRIPTS)      \
                $(DESTDIR)$(servicedir)/$(service_DATA)
+       -systemctl daemon-reload
 
 endif
 
index 36da2affb42c2757da894f70029e54c53255fb2e..6242d88c868f1f835b9a01336ad7fccf47f54855 100644 (file)
@@ -4,7 +4,7 @@
 # REQUIRE: cnid_metad
 # KEYWORD: shutdown
 #
-# Apple Filing Protocol daemon.
+# Apple Filing Protocol daemon. (netatalk :NETATALK_VERSION:)
 # If you use AppleTalk, Make sure not to start atalkd in the background:
 # its data structures must have time to stablize before running the
 # other processes.
index 6a0f489a27db73014cf0661c683a1e3f98913f94..b3249cc6682efe7a5b75eb2a55bd4d84780807c4 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Netatalk daemons.
+# Netatalk :NETATALK_VERSION: daemons.
 # If you use AppleTalk, Make sure not to start atalkd in the background:
 # its data structures must have time to stablize before running the
 # other processes.
index a9fafd1320b8a2e4429b1295dc0bf830102212b9..ac5d8da0ac6337ef81b0805a8cea0530ca3abd25 100644 (file)
@@ -7,7 +7,7 @@
 # Default-Stop:      1
 ### END INIT INFO
 #
-# netatalk      Netatalk 2.x initscript
+# netatalk      Netatalk :NETATALK_VERSION: initscript
 # Author:       Thomas Kaiser <Thomas.Kaiser@phg-online.de>
 
 set -e
index 5ed475c556acff5b1c9b4ed3a0c83c86d9c6f148..5f0c65f1a4c4fbb5c35720270a9c461345fad8f0 100644 (file)
@@ -1,6 +1,6 @@
 #!/sbin/runscript
 
-# Netatalk daemons.
+# Netatalk :NETATALK_VERSION: daemons.
 # If you use AppleTalk, Make sure not to start atalkd in the background:
 # its data structures must have time to stablize before running the
 # other processes.
index e05972b3d7e72e229b99b1353e234295db7084ba..58f197aed36f8a98949ab991df974e0105ca5e61 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Netatalk daemons.
+# Netatalk :NETATALK_VERSION: startup script for systemd.
 
 ATALK_BIN=:BINDIR:
 ATALK_CONF_DIR=:ETCDIR:
@@ -30,44 +30,52 @@ if [ -f ${ATALK_CONF_DIR}/netatalk.conf ]; then
     . ${ATALK_CONF_DIR}/netatalk.conf
 fi
 
-if [ x"${ATALKD_RUN}" != x"no" -a -x ${ATALK_SBIN}/atalkd ]; then
+netatalk_startup() {
+    if [ x"${ATALKD_RUN}" != x"no" -a -x ${ATALK_SBIN}/atalkd ]; then
        ${ATALK_SBIN}/atalkd
-
+       
        if [ -x ${ATALK_BIN}/nbprgstr ]; then
            ${ATALK_BIN}/nbprgstr -p 4 ${ATALK_NAME}:Workstation${ATALK_ZONE}
            ${ATALK_BIN}/nbprgstr -p 4 ${ATALK_NAME}:netatalk${ATALK_ZONE}
        fi      
-
+       
        if [ x"${PAPD_RUN}" = x"yes"  -a -x ${ATALK_SBIN}/papd ]; then
            ${ATALK_SBIN}/papd
        fi
-
+       
        # check for timelord in bin directory
        if [ x"${TIMELORD_RUN}" = x"yes"  -a -x ${ATALK_BIN}/timelord ]; then
            ${ATALK_BIN}/timelord
        fi
-
+       
        # check for timelord in sbin directory
        if [ x"${TIMELORD_RUN}" = x"yes"  -a -x ${ATALK_SBIN}/timelord ]; then
            ${ATALK_SBIN}/timelord
        fi
-
+       
        # check for a2boot in bin directory
        if [ x"${A2BOOT_RUN}" = x"yes"  -a -x ${ATALK_BIN}/a2boot ]; then
            ${ATALK_BIN}/a2boot
        fi
-
+       
        # check for a2boot in sbin directory
        if [ x"${A2BOOT_RUN}" = x"yes"  -a -x ${ATALK_SBIN}/a2boot ]; then
            ${ATALK_SBIN}/a2boot
        fi
-fi
-
-if [ x"${CNID_METAD_RUN}" = x"yes" -a -x ${ATALK_SBIN}/cnid_metad ]; then
+    fi
+    
+    if [ x"${CNID_METAD_RUN}" = x"yes" -a -x ${ATALK_SBIN}/cnid_metad ]; then
        ${ATALK_SBIN}/cnid_metad $CNID_CONFIG
-fi
-
-if [ x"${AFPD_RUN}" = x"yes" -a -x ${ATALK_SBIN}/afpd ]; then
+    fi
+    
+    if [ x"${AFPD_RUN}" = x"yes" -a -x ${ATALK_SBIN}/afpd ]; then
        ${ATALK_SBIN}/afpd ${AFPD_UAMLIST} -g ${AFPD_GUEST} \
-               -c ${AFPD_MAX_CLIENTS} -n ${ATALK_NAME}${ATALK_ZONE}
+            -c ${AFPD_MAX_CLIENTS} -n ${ATALK_NAME}${ATALK_ZONE}
+    fi
+}
+
+if [ x"${ATALK_BGROUND}" = x"yes" -a x"${ATALKD_RUN}" != x"no" ]; then 
+    netatalk_startup >& /dev/null &
+else
+    netatalk_startup
 fi
index 79b613bd69b614afb1200af5c1f07c67946ddd52..f066232b2d1289025bdfc3b57a090142ffc7e7ea 100644 (file)
@@ -4,7 +4,7 @@
 #              and provides printer, file sharing, and routing 
 #              services via legacy AppleTalk networking protocol.
 #
-# Netatalk daemons.
+# Netatalk :NETATALK_VERSION: daemons.
 # If you use AppleTalk, Make sure not to start atalkd in the background:
 # its data structures must have time to stablize before running the
 # other processes.
index f392d51cfc5a6cd1480a0eb040227ab487a86f0b..68328e6d779f26b5d627d3c306054d2d2a395d2d 100755 (executable)
@@ -16,6 +16,8 @@
 # Description:    AFP over TCP and legacy AppleTalk daemons
 ### END INIT INFO
 
+# Netatalk :NETATALK_VERSION:
+
 ATALK_NAME=`hostname|sed 's/\..*$//'`
 ATALK_UNIX_CHARSET='LOCALE'
 ATALK_MAC_CHARSET='MAC_ROMAN'
index 85ec0748f5b6add6f72f3522d3b5dd42e41915b2..ddad742d38bd9fbd79ba5e5a5b081d9035d58bea 100755 (executable)
@@ -1,8 +1,7 @@
 #! /bin/sh
 #
-# Start/stop the Netatalk daemons.
+# Start/stop the Netatalk :NETATALK_VERSION: daemons.
 #
-# Netatalk daemons.
 # If you use AppleTalk, Make sure not to start atalkd in the background:
 # its data structures must have time to stablize before running the
 # other processes.
index 3a7f97032d77231b92b7115538c36d94127656a5..0c350af4d91b62f1d5157ae2516875a890361ada 100755 (executable)
@@ -1,8 +1,7 @@
 #! /bin/sh
 #
-# Start/stop the Netatalk daemons.
+# Start/stop the Netatalk :NETATALK_VERSION: daemons.
 #
-# Netatalk daemons.
 # If you use AppleTalk, Make sure not to start atalkd in the background:
 # its data structures must have time to stablize before running the
 # other processes.
index a567048791d54337152b999ede79ba0403f828c7..d531204b9135d1dd387c514784a813004a4777b8 100644 (file)
@@ -3,7 +3,7 @@
 # PROVIDE: atalkd
 # REQUIRE: DAEMON
 #
-# AppleTalk daemon.
+# AppleTalk daemon. (netatalk :NETATALK_VERSION:)
 # If you use AppleTalk, Make sure not to start atalkd in the background:
 # its data structures must have time to stablize before running the
 # other processes.
index b0963cfea6c287a0885e400f6d91395b740972c1..caeba08ef6b4f7754000889129db64d768142aeb 100644 (file)
@@ -2,7 +2,7 @@
 #
 # PROVIDE: cnid_metad
 #
-# Start cnid_dbd daemons on request.
+# Start cnid_dbd daemons on request.  (netatalk :NETATALK_VERSION:)
 # The cnid_dbd is an implementation for accessing to CNID databases
 # through a dedicated daemon process.
 #
index 4b2f3d6a6c35bfa407958f0ba0135ecbe5024281..f32cb7cbc91c37a2a834cca94036620afd4e8906 100644 (file)
@@ -3,7 +3,7 @@
 # PROVIDE: papd
 # REQUIRE: atalkd
 #
-# AppleTalk print server daemon.
+# AppleTalk print server daemon.  (netatalk :NETATALK_VERSION:)
 # Make sure not to start atalkd in the background:
 # its data structures must have time to stablize before running the
 # other processes.
index 2c4f2bbfdef740f710d8e8c7b4c8a84be86ac84b..aae4b7a379227fe78a6623b95456d31afc0cd468 100644 (file)
@@ -3,7 +3,7 @@
 # PROVIDE: timelord
 # REQUIRE: atalkd
 #
-# AppleTalk time server daemon.
+# AppleTalk time server daemon. (netatalk :NETATALK_VERSION:)
 # Make sure not to start atalkd in the background:
 # its data structures must have time to stablize before running the
 # other processes.
index 57316299362797a426ece99e5660fb37f18ac12d..cd7a3dfcfb4e798a32d2e9bbb7f6a1a2918f5576 100644 (file)
@@ -1,4 +1,4 @@
-# netatalk service file for systemd
+# This file is part of netatalk :NETATALK_VERSION:.
 
 [Unit]
 Description=File and Printer sharing for Macintosh clients
@@ -6,7 +6,7 @@ After=syslog.target network.target
 
 [Service]
 Type=oneshot
-ExecStart=/bin/bash -c "exec :PKGLIBEXECDIR:/netatalk.sh"
+ExecStart=/bin/sh -c "exec :PKGLIBEXECDIR:/netatalk.sh"
 RemainAfterExit=yes
 
 [Install]
index 7f567ca5800c6a727776b972ff4b9e2bd812b218..0a565a2aaee3c9818eac116a1fa24d94260f77cf 100644 (file)
@@ -11,10 +11,7 @@ AC_DEFUN([AC_NETATALK_CONFIG_SUMMARY], [
                AC_MSG_RESULT([         none])
        fi
        AC_MSG_RESULT([    AFP:])
-       AC_MSG_RESULT([         AFP 3.x calls activated: $afp3])
-       if test "x$afp3" = "xyes"; then
-               AC_MSG_RESULT([         Large file support (>2GB) for AFP3: $wx_largefile])
-       fi
+       AC_MSG_RESULT([         Large file support (>2GB) for AFP3: $wx_largefile])
        AC_MSG_RESULT([         Extended Attributes: $neta_cv_eas])
        AC_MSG_RESULT([    CNID:])
        AC_MSG_RESULT([         backends: $compiled_backends])
@@ -48,7 +45,10 @@ AC_DEFUN([AC_NETATALK_CONFIG_SUMMARY], [
        AC_MSG_RESULT([         guest])
        AC_MSG_RESULT([    Options:])
        AC_MSG_RESULT([         DDP (AppleTalk) support: $netatalk_cv_ddp_enabled])
-       AC_MSG_RESULT([         CUPS support:            $netatalk_cv_use_cups])
+       if test "x$netatalk_cv_ddp_enabled" = "xyes"; then
+               AC_MSG_RESULT([         CUPS support:            $netatalk_cv_use_cups])
+               AC_MSG_RESULT([         Apple 2 boot support:    $compile_a2boot])
+       fi
        AC_MSG_RESULT([         SLP support:             $netatalk_cv_srvloc])
        AC_MSG_RESULT([         Zeroconf support:        $netatalk_cv_zeroconf])
        AC_MSG_RESULT([         tcp wrapper support:     $netatalk_cv_tcpwrap])
@@ -61,7 +61,6 @@ dnl   fi
        AC_MSG_RESULT([         cracklib support:        $netatalk_cv_with_cracklib])
        AC_MSG_RESULT([         dropbox kludge:          $netatalk_cv_dropkludge])
        AC_MSG_RESULT([         force volume uid/gid:    $netatalk_cv_force_uidgid])
-       AC_MSG_RESULT([         Apple 2 boot support:    $compile_a2boot])
        AC_MSG_RESULT([         ACL support:             $with_acl_support])
        AC_MSG_RESULT([         LDAP support:            $with_ldap])
        if test x"$use_pam_so" = x"yes" -a x"$netatalk_cv_install_pam" = x"no"; then