+++ /dev/null
-Makefile
-Makefile.in
-achfile
-afile
-.deps
-.libs
-.gitignore
-achfile.o afile.o common.o
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.
# 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";
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");
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));
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") {
#
#
-# This edition is a part of netatalk.
+# This edition is a part of netatalk @NETATALK_VERSION@.
#
use strict;
$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);
}
-e s@:SBINDIR:@${sbindir}@ \
-e s@:ETCDIR:@${pkgconfdir}@ \
-e s@:PKGLIBEXECDIR:@${pkglibexecdir}@ \
+ -e s@:NETATALK_VERSION:@${NETATALK_VERSION}@ \
<$< >$@
GENERATED_FILES = \
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
# 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.
#!/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.
# 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
#!/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.
#!/bin/sh
-# Netatalk daemons.
+# Netatalk :NETATALK_VERSION: startup script for systemd.
ATALK_BIN=:BINDIR:
ATALK_CONF_DIR=:ETCDIR:
. ${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
# 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.
# 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'
#! /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.
#! /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.
# 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.
#
# 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.
#
# 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.
# 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.
-# netatalk service file for systemd
+# This file is part of netatalk :NETATALK_VERSION:.
[Unit]
Description=File and Printer sharing for Macintosh clients
[Service]
Type=oneshot
-ExecStart=/bin/bash -c "exec :PKGLIBEXECDIR:/netatalk.sh"
+ExecStart=/bin/sh -c "exec :PKGLIBEXECDIR:/netatalk.sh"
RemainAfterExit=yes
[Install]
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])
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])
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