]> arthur.barton.de Git - netatalk.git/commitdiff
Once again rework cnid_metad logging setup code and config.
authorfranklahm <franklahm>
Tue, 9 Jun 2009 11:58:48 +0000 (11:58 +0000)
committerfranklahm <franklahm>
Tue, 9 Jun 2009 11:58:48 +0000 (11:58 +0000)
Checked in the according manpages too.
Also fixed: downstream Debian patches to their init script.

12 files changed:
config/netatalk.conf
distrib/initscripts/Makefile.am
distrib/initscripts/rc.atalk.bsd.tmpl
distrib/initscripts/rc.atalk.cobalt
distrib/initscripts/rc.atalk.debian.tmpl
distrib/initscripts/rc.atalk.gentoo.tmpl
distrib/initscripts/rc.atalk.redhat.tmpl
distrib/initscripts/rc.atalk.suse.tmpl
distrib/initscripts/rc.atalk.sysv.tmpl
etc/cnid_dbd/cnid_metad.c
man/man5/netatalk.conf.5.tmpl
man/man8/cnid_metad.8.tmpl

index 101c83b0156ce58c9d0598c004ac3cc3da1d5742..960de86650abacf476a3e1bc858091551e44c097 100644 (file)
@@ -35,5 +35,5 @@ ATALK_BGROUND=no
 export ATALK_MAC_CHARSET
 export ATALK_UNIX_CHARSET
 
-# log config for cnid_metad and cnid_dbd
-# CNID_DBD_LOGCONFIG="default log_note"
\ No newline at end of file
+# config for cnid_metad. Default log config:
+# CNID_CONFIG="-l log_note"
\ No newline at end of file
index 31c23c267ec2aa4967e0d1487251c7e781580df4..cd2cfb05a654afece654bee08f221a6c08fa6f37 100644 (file)
@@ -42,7 +42,7 @@ TEMPLATES = \
        rc.atalk.gentoo.tmpl            \
        rc.atalk.debian.tmpl
 
-CLEANFILES = $(GENERATED_FILES) atalk afpd atalkd papd timelord
+CLEANFILES = $(GENERATED_FILES) atalk afpd atalkd netatalk papd timelord
 EXTRA_DIST = $(TEMPLATES) rc.atalk.cobalt
 
 # overwrite automake uninstall
@@ -222,18 +222,18 @@ endif
 if USE_DEBIAN
 
 sysvdir = /etc/init.d
-sysv_SCRIPTS = atalk
+sysv_SCRIPTS = netatalk
 
-atalk: rc.atalk.debian
-       cp -f rc.atalk.debian atalk
-       chmod a+x atalk
+netatalk: rc.atalk.debian
+       cp -f rc.atalk.debian netatalk
+       chmod a+x netatalk
 
 install-data-hook:
-       update-rc.d atalk defaults 90 10
+#      update-rc.d netatalk defaults 90 10
 
 uninstall-startup:
-       rm -f /etc/init.d/atalk
-       update-rc.d atalk remove
+#      rm -f /etc/init.d/netatalk
+#      update-rc.d netatalk remove
 
 endif
 
index 778996ca262909d4f8daaf722794f00803dbf754..f4d17fa75e8879bbb7ace7bf00a0f4e25fcf4a5a 100755 (executable)
@@ -22,7 +22,7 @@ fi
 if [ -x :BINDIR:/nbprgstr ]; then
        :BINDIR:/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:Workstation
        :BINDIR:/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:netatalk
-                                       echo -n ' nbprgstr'
+       echo -n ' nbprgstr'
 fi
 
 if [ -x :SBINDIR:/papd ]; then
@@ -30,11 +30,7 @@ if [ -x :SBINDIR:/papd ]; then
 fi
 
 if [ -x :SBINDIR:/cnid_metad ]; then
-    if [ "x$CNID_DBD_LOGCONFIG" = "x" ]; then
-        :SBINDIR:/cnid_metad
-    else
-        :SBINDIR:/cnid_metad -l "$CNID_DBD_LOGCONFIG"
-    fi
+    :SBINDIR:/cnid_metad $CNID_CONFIG
     echo -n ' cnid_metad'
 fi
 
index 8c92802aa068f394ad7c932ff4716df4d5a8aa17..dc1010923ef591bfb5327397b6e2291480bb1235 100644 (file)
@@ -73,7 +73,7 @@ atalk_startup() {
     fi
 
     if [ x"${CNID_METAD_RUN}" = x"yes" -a -x /usr/sbin/cnid_metad ] ; then
-           daemon /usr/sbin/cnid_metad
+           daemon /usr/sbin/cnid_metad $CNID_CONFIG
            RETVAL_CNID_METAD=$?
     fi
 
index 8139527403c32ceec0d396aa88ceff6131ecc528..7fce712f635e17e5b1bce933f4ac8a11e34ebb34 100644 (file)
@@ -1,32 +1,50 @@
 #!/bin/sh
+### BEGIN INIT INFO
+# Provides:          netatalk
+# Required-Start:    $remote_fs $syslog
+# Required-Stop:     $remote_fs $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      1
+### END INIT INFO
 #
-# atalk         Netatalk 2.x initscript
-#
+# netatalk      Netatalk 2.x initscript
 # Author:       Thomas Kaiser <Thomas.Kaiser@phg-online.de>
-#
-# Version:      $Id: rc.atalk.debian.tmpl,v 1.5 2009-05-19 11:56:23 franklahm Exp $
+# Version:      $Id: rc.atalk.debian.tmpl,v 1.6 2009-06-09 11:58:49 franklahm Exp $
 
 set -e
 
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 DESC="Netatalk"
-NAME=atalk
+NAME=netatalk
 SCRIPTNAME=/etc/init.d/$NAME
 
 # Guard to prevent execution if netatalk was removed.
 test -x :SBINDIR:/atalkd || exit 0
 
+# Set defaults. Please change these options in /etc/default/netatalk
+AFPD_UAMLIST="-U uams_dhx2.so"
+AFPD_GUEST=nobody
+AFPD_MAX_CLIENTS=50
+ATALK_ZONE=
+ATALK_NAME=`/bin/hostname --short`
+ATALK_BGROUND=no
+CNID_METAD_RUN=yes
+ATALK_MAC_CHARSET='MAC_ROMAN'
+ATALK_UNIX_CHARSET='LOCALE'
+
 # Read in netatalk configuration.
-if [ -f :ETCDIR:/netatalk.conf ]; then
-       . :ETCDIR:/netatalk.conf
+if [ -f /etc/default/netatalk ]; then
+    . /etc/default/netatalk
 fi
 
 # Start Netatalk servers.
 atalk_startup() {
        if [ x"$ATALKD_RUN" = x"yes" ]; then
 
-       # Try to load the AppleTalk kernel module
-       /sbin/modprobe appletalk || echo "[could not load appletalk module]"
+       # Try to load the AppleTalk kernel module if it was intended.
+    if grep -q '^appletalk$' /etc/modules; then
+        /sbin/modprobe appletalk || echo "[could not load appletalk module]"
+    fi
 
        # Start atalkd server.
        :SBINDIR:/atalkd
@@ -39,13 +57,9 @@ atalk_startup() {
        fi
        
        # prepare startup of file services
-       if [ x"${CNID_METAD_RUN}" = x"yes" -a -x :SBINDIR:/cnid_metad ] ; then
+       if [ "x$CNID_METAD_RUN" = "xyes" -a -x :SBINDIR:/cnid_metad ] ; then
                echo -n " cnid_metad"
-        if [ "x$CNID_DBD_LOGCONFIG" = "x" ]; then
-            :SBINDIR:/cnid_metad
-        else
-            :SBINDIR:/cnid_metad -l "$CNID_DBD_LOGCONFIG"
-        fi
+        :SBINDIR:/cnid_metad $CNID_CONFIG
     fi
        
        if [ x"$AFPD_RUN" = x"yes" ]; then
@@ -54,20 +68,22 @@ atalk_startup() {
        echo -n " afpd"
        fi
 
-       if [ x"$ATALKD_RUN" = x"yes" -a x"$PAPD_RUN" = x"yes" ]; then
-       :SBINDIR:/papd
-       echo -n " papd"
-       fi
+    if [ "x$ATALKD_RUN" = "xyes" ]; then
+        if [ "x$PAPD_RUN" = "xyes" ]; then
+            :SBINDIR:/papd
+            echo -n " papd"
+        fi
 
-       if [ x"$TIMELORD_RUN" = x"yes" ]; then
-       :SBINDIR:/timelord
-       echo -n " timelord"
-       fi
+        if [ x"$TIMELORD_RUN" = x"yes" ]; then
+            :SBINDIR:/timelord
+            echo -n " timelord"
+        fi
+    fi
 }
 
 case "$1" in
        start)
-               if test x"${ATALK_BGROUND}" = x"yes"; then
+               if test "x$ATALK_BGROUND" = "xyes"; then
                        echo "Starting Netatalk services in the background."
                        atalk_startup >/dev/null &
                else
index 203c2f7c938cde3642d325607d3f5a2a6e12d993..f83df15e648e1574be1453da8025c7275b2ab857 100644 (file)
@@ -36,11 +36,7 @@ atalk_startup () {
 
        if [ "${CNID_METAD_RUN}" = "yes" ] ; then
         ebegin "Starting cnid_metad"
-        if [ "x$CNID_DBD_LOGCONFIG" = "x" ]; then
-                   start-stop-daemon --start --quiet --exec :SBINDIR:/cnid_metad
-        else
-                   start-stop-daemon --start --quiet --exec :SBINDIR:/cnid_metad -l "$CNID_DBD_LOGCONFIG"
-        fi
+               start-stop-daemon --start --quiet --exec :SBINDIR:/cnid_metad $CNID_CONFIG
                eend $?
        fi
 
index a9349d0a983956e6a880678036333adb235e758c..7bc94452fe89dd9b4d3fd2e69579f451c07b00af 100644 (file)
@@ -101,11 +101,7 @@ atalk_startup() {
 
     if [ x"${CNID_METAD_RUN}" = x"yes" -a -x ${ATALK_SBIN}/cnid_metad ] ; then
            echo -n "  Starting cnid_metad:"
-        if [ "x$CNID_DBD_LOGCONFIG" = "x" ]; then
-            daemon ${ATALK_SBIN}/cnid_metad
-        else
-            daemon ${ATALK_SBIN}/cnid_metad -l "$CNID_DBD_LOGCONFIG"
-        fi
+        daemon ${ATALK_SBIN}/cnid_metad $CNID_CONFIG
            RETVAL_CNID_METAD=$?
            echo
     fi
index 3998782698899d344665afccfdaf397513d24375..813ba0c56c7d88240b3e51613711f9c318cc7bca 100755 (executable)
@@ -58,11 +58,7 @@ atalk_startup() {
 
     if [ x"${CNID_METAD_RUN}" = x"yes" -a -x :SBINDIR:/cnid_metad ] ; then
            echo -n "  Starting cnid_metad:"
-        if [ "x$CNID_DBD_LOGCONFIG" = "x" ]; then
-            startproc :SBINDIR:/cnid_metad
-        else
-            startproc :SBINDIR:/cnid_metad -l "$CNID_DBD_LOGCONFIG"
-        fi
+        startproc :SBINDIR:/cnid_metad $CNID_CONFIG
     fi
 
     if [ x"${AFPD_RUN}" = x"yes" -a -x :SBINDIR:/afpd ] ; then
index 2263084feafc8be8bddb25e67d711afc974ad729..ee979d2d4e8bfd9341de2e9683dfa9a4eba0a7e3 100755 (executable)
@@ -50,11 +50,7 @@ atalk_startup() {
        fi
 
        if [ x"${CNID_METAD_RUN}" = x"yes" -a -x :SBINDIR:/cnid_metad ]; then
-        if [ "x$CNID_DBD_LOGCONFIG" = "x" ]; then
-            :SBINDIR:/cnid_metad
-        else
-            :SBINDIR:/cnid_metad -l "$CNID_DBD_LOGCONFIG"
-        fi
+        :SBINDIR:/cnid_metad $CNID_CONFIG
         echo ' cnid_metad\c'
        fi
 
index 324505ca162524fa563c15d7622192a70f0cda28..3aaf4f150b5a082ece792377e5575c19f9cc891e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_metad.c,v 1.11 2009-05-26 07:16:56 franklahm Exp $
+ * $Id: cnid_metad.c,v 1.12 2009-06-09 11:58:49 franklahm Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -99,6 +99,7 @@
 #endif
 #endif
 
+#include <atalk/util.h>
 #include <atalk/logger.h>
 #include <atalk/cnid_dbd_private.h>
 
@@ -130,7 +131,7 @@ struct server {
 static struct server srv[MAXVOLS];
 
 /* Default logging config: log to syslog with level log_note */
-static char *logconfig = "default log_note";
+static char logconfig[MAXPATHLEN + 21 + 1] = "default log_note";
 
 static struct server *test_usockfn(char *dir)
 {
@@ -408,10 +409,12 @@ int main(int argc, char *argv[])
     int    err = 0;
     int    debug = 0;
     int    ret;
+    char   *loglevel = NULL;
+    char   *logfile  = NULL;
 
     set_processname("cnid_metad");
 
-    while (( cc = getopt( argc, argv, "ds:p:h:u:g:l:")) != -1 ) {
+    while (( cc = getopt( argc, argv, "ds:p:h:u:g:l:f:")) != -1 ) {
         switch (cc) {
         case 'd':
             debug = 1;
@@ -440,7 +443,10 @@ int main(int argc, char *argv[])
             dbdpn = strdup(optarg);
             break;
         case 'l':
-            logconfig = strdup(optarg);
+            loglevel = strdup(optarg);
+            break;
+        case 'f':
+            logfile = strdup(optarg);
             break;
         default:
             err++;
@@ -448,6 +454,15 @@ int main(int argc, char *argv[])
         }
     }
 
+    if (loglevel) {
+        strlcpy(logconfig + 8, loglevel, 13);
+        free(loglevel);
+        strcat(logconfig, " ");
+    }
+    if (logfile) {
+        strlcat(logconfig, logfile, MAXPATHLEN);
+        free(logfile);
+    }
     setuplog(logconfig);
 
     if (err) {
index 7ebe7ac6d171139eaf1773b828ac53ded9ac0eb0..d17d277ee204f652187a5c0e37ab7de9c376610f 100644 (file)
-.TH netatalk.conf 5 "24 June 2004" 2.0.0 Netatalk 
-.SH NAME
-netatalk.conf \- Configuration file used by netatalk(8) to determine its general configuration 
-.SH DESCRIPTION
-\fI:ETCDIR:/netatalk.conf\fR is the
-configuration file used by afpd to determine what portions of the file
-system will be shared via Appletalk, as well as their behaviors.
-.PP
-Any line not prefixed with \fI#\fR is
-interpreted. The configuration lines are composed like:
-.PP
-\fIoption\fR \fI=\fR
+'\" t
+.\"     Title: netatalk.conf
+.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
+.\" Generator: DocBook XSL Stylesheets v1.74.3 <http://docbook.sf.net/>
+.\"      Date: 9 Jun 2009
+.\"    Manual: Netatalk 2.1
+.\"    Source: Netatalk 2.1
+.\"  Language: English
+.\"
+.TH "NETATALK\&.CONF" "5" "9 Jun 2009" "Netatalk 2\&.1" "Netatalk 2.1"
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+netatalk.conf \- Configuration file used by netatalk(8) to determine its general configuration
+.SH "DESCRIPTION"
+.PP
+\fB:ETCDIR:/netatalk\&.conf\fR
+is the configuration file used by afpd to determine what portions of the file system will be shared via Appletalk, as well as their behaviors\&.
+.PP
+Any line not prefixed with
+\fB#\fR
+is interpreted\&. The configuration lines are composed like:
+.PP
+\fIoption\fR
+\fB=\fR
 \fIvalue\fR
 .PP
 The possible options and their meanings are:
-.TP 
-\fIAFPD_GUEST\fR
-Sets the id of the guest user to a local user on the system.
-.TP 
-\fIAFPD_MAX_CLIENTS\fR
-Sets the maximum number of clients that can simultaneously
-connect to the server.
-.TP 
-\fIAFPD_RUN\fR
-Enables the afpd daemon if set to "yes". This should
-be enabled if you are planning on using netatalk as a file server.
-.TP 
-\fIAFPD_UAM_LIST\fR
-Sets the default UAMs for afpd (and papd, if printer
-authentication is compiled in) to use.
-
-\fIExample:\fR \fIAFPD_UAMLIST\fR=\fI"\-U uams_guest.so,uams_randnum.so"\fR
-.TP 
-\fICNID_METAD_RUN\fR
-Enables the cnid_metad daemon if set to "yes". This
-should be enabled if you are going to use the dbd CNID backend.
-.TP 
-\fIATALK_BGROUND\fR
-"yes" will set netatalk to initialize in the
-background, and "no" will cause normal initialization.
-.TP 
-\fIATALK_NAME\fR
-Sets the machines' Appletalk name.
-.TP 
-\fIATALK_ZONE\fR
-Sets the machines' Appletalk zone.
-.TP 
-\fIATALKD_RUN\fR
-Enables the atalkd daemon if set to "yes". This should
-be enabled if you are planning on providing Appletalk services.
-.TP 
-\fIPAPD_RUN\fR
-Enables the papd daemon if set to "yes". This should
-be enabled if you are planning on using netatalk as a print server.
-.TP 
-\fIATALK_MAC_CHARSET\fR
-Set the Mac client codepage, used by atalkd and papd to
-convert extended characters from the Unix to the Mac codepage.
-.TP 
-\fIATALK_UNIX_CHARSET\fR
-Set the Unix codepage, used by atalkd and papd to convert
-extended characters from the Unix to the Mac codepage. Has to match
-the codepage of the configuration files.
+.PP
+\fBAFPD_GUEST\fR
+.RS 4
+Sets the id of the guest user to a local user on the system\&.
+.RE
+.PP
+\fBAFPD_MAX_CLIENTS\fR
+.RS 4
+Sets the maximum number of clients that can simultaneously connect to the server\&.
+.RE
+.PP
+\fBAFPD_RUN\fR
+.RS 4
+Enables the afpd daemon if set to "yes"\&. This should be enabled if you are planning on using netatalk as a file server\&.
+.RE
+.PP
+\fBAFPD_UAM_LIST\fR
+.RS 4
+Sets the default UAMs for afpd (and papd, if printer authentication is compiled in) to use\&.
+.sp
+\fIExample:\fR
+\fBAFPD_UAMLIST\fR=\fB"\-U uams_guest\&.so,uams_randnum\&.so"\fR
+.RE
+.PP
+\fBCNID_METAD_RUN\fR
+.RS 4
+Enables the cnid_metad daemon if set to "yes"\&. This should be enabled if you are going to use the dbd CNID backend\&.
+.RE
+.PP
+\fBCNID_CONFIG\fR
+.RS 4
+Configuration options for cnid_metad\&. See:
+\fBcnid_metad\fR(8)
+.RE
+.PP
+\fBATALK_BGROUND\fR
+.RS 4
+"yes" will set netatalk to initialize in the background, and "no" will cause normal initialization\&.
+.RE
+.PP
+\fBATALK_NAME\fR
+.RS 4
+Sets the machines\' Appletalk name\&.
+.RE
+.PP
+\fBATALK_ZONE\fR
+.RS 4
+Sets the machines\' Appletalk zone\&.
+.RE
+.PP
+\fBATALKD_RUN\fR
+.RS 4
+Enables the atalkd daemon if set to "yes"\&. This should be enabled if you are planning on providing Appletalk services\&.
+.RE
+.PP
+\fBPAPD_RUN\fR
+.RS 4
+Enables the papd daemon if set to "yes"\&. This should be enabled if you are planning on using netatalk as a print server\&.
+.RE
+.PP
+\fBATALK_MAC_CHARSET\fR
+.RS 4
+Set the Mac client codepage, used by atalkd and papd to convert extended characters from the Unix to the Mac codepage\&.
+.RE
+.PP
+\fBATALK_UNIX_CHARSET\fR
+.RS 4
+Set the Unix codepage, used by atalkd and papd to convert extended characters from the Unix to the Mac codepage\&. Has to match the codepage of the configuration files\&.
+.RE
 .SH "SEE ALSO"
+.PP
 \fBatalkd\fR(8),
 \fBatalkd.conf\fR(5)
-
index 77761f8adf3953341e7afd79a0169a01b1c88173..6f05311deac195fe65a8e7bbb3e9b711a5e1c263 100644 (file)
-.TH cnid_metad 8 "28 Nov 2003" 2.0.0 Netatalk 
-.SH NAME
+'\" t
+.\"     Title: cnid_metad
+.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
+.\" Generator: DocBook XSL Stylesheets v1.74.3 <http://docbook.sf.net/>
+.\"      Date: 9 Jun 2009
+.\"    Manual: Netatalk 2.1
+.\"    Source: Netatalk 2.1
+.\"  Language: English
+.\"
+.TH "CNID_METAD" "8" "9 Jun 2009" "Netatalk 2\&.1" "Netatalk 2.1"
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
 cnid_metad \- start cnid_dbd daemons on request
-.SH SYNOPSIS
-\fBcnid_metad\fR [\-d] [ \-h \fBhostname\fR ] [ \-p \fBport\fR ] [ \-u \fBuser\fR ] [ \-g \fBgroup\fR ] [ \-s \fBcnid_dbdpathname\fR ]
-.SH DESCRIPTION
-cnid_metad waits for requests from \fIafpd\fR to start up instances of the \fIcnid_dbd\fR
-daemon. It keeps track of the status of a \fIcnid_dbd\fR
-instance once started and will restart it if necessary.
-cnid_metad is normally started at boot time from
-\fB/etc/rc\fR or equivalent and runs until shutdown.
-\fIafpd\fR needs to be configured with the
-\fB\-cnidserver\fR option in \fIafpd.conf\fR
-in order to access \fIcnid_metad.\fR It is
-possible to run more than one instance of cnid_metad on
-the same machine if different values for the interface and/or port are
-specified with the \fB\-h\fR and \fB\-p\fR options.
-.SH OPTIONS
-.TP 
+.SH "SYNOPSIS"
+.HP \w'\fBcnid_metad\fR\fB\fR\ 'u
+\fBcnid_metad\fR\fB\fR [\-l\ \fIloglevel\fR\ [\-f\ \fIfilename\fR]] [\-d] [\-h\ \fIhostname\fR] [\-p\ \fIport\fR] [\-u\ \fIuser\fR] [\-g\ \fIgroup\fR] [\-s\ \fIcnid_dbdpathname\fR]
+.SH "DESCRIPTION"
+.PP
+\fBcnid_metad\fR
+waits for requests from
+\fBafpd\fR
+to start up instances of the
+\fBcnid_dbd\fR
+daemon\&. It keeps track of the status of a
+\fBcnid_dbd\fR
+instance once started and will restart it if necessary\&.
+\fBcnid_metad\fR
+is normally started at boot time from
+/etc/rc
+or equivalent and runs until shutdown\&.
+\fBafpd\fR
+needs to be configured with the
+\fB\-cnidserver\fR
+option in
+\fBafpd\&.conf\fR
+in order to access
+\fBcnid_metad\&.\fR
+It is possible to run more than one instance of
+\fBcnid_metad\fR
+on the same machine if different values for the interface and/or port are specified with the
+\fB\-h\fR
+and
+\fB\-p\fR
+options\&.
+.SH "OPTIONS"
+.PP
+\fB\-l\fR\fI <loglevel> [\-f <filename>]\fR
+.RS 4
+Specify that any message of a loglevel up to the given
+\fBloglevel\fR
+should be logged to the given file\&. If the filename is ommited the loglevel applies to messages passed to syslog\&. Default is logs to syslog with a default logging setup of
+\fB"log_note\fR"\&.
+.sp
+\fBNote:\fR
+\fBcnid_metad\fR
+passes this to
+\fBcnid_dbd\fR
+which will in turn use this for its logging setup\&.
+.sp
+loglevels: LOG_SEVERE, LOG_ERROR, LOG_WARN, LOG_NOTE, LOG_INFO, LOG_DEBUG, LOG_DEBUG6, LOG_DEBUG7, LOG_DEBUG8, LOG_DEBUG9, LOG_MAXDEBUG
+.PP
+\fBExample.\ \&Useful default config\fR
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\-l log_info \-f /var/log/afpd\&.log
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+\fBExample.\ \&Debugging config\fR
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\-l log_maxdebug \-f /var/log/afpd\&.log
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
 \fB\-d\fR
-\fIcnid_metad will remain in the foreground
-and\fR will also leave the standard input, standard output
-and standard error file descriptors open. Useful for debugging.
-.TP 
+.RS 4
+\fBcnid_metad will remain in the foreground and\fR
+will also leave the standard input, standard output and standard error file descriptors open\&. Useful for debugging\&.
+.RE
+.PP
 \fB\-h\fR\fI hostname\fR
-Use \fIhostname\fR as the network
-interface for requests as opposed to the default \fIlocalhost
-\fR\&.
-.TP 
+.RS 4
+Use
+\fIhostname\fR
+as the network interface for requests as opposed to the default
+\fBlocalhost \fR\&.
+.RE
+.PP
 \fB\-p\fR\fI port\fR
-Use \fIport\fR as the port number for
-reqests. Default is 4700.
-.TP 
+.RS 4
+Use
+\fIport\fR
+as the port number for reqests\&. Default is 4700\&.
+.RE
+.PP
 \fB\-u\fR\fI user\fR
-Switch to the userid of \fIuser\fR
-before serving requests. This userid will be inherited by all
-\fIcnid_dbd\fR daemon processes started.
-.TP 
+.RS 4
+Switch to the userid of
+\fIuser\fR
+before serving requests\&. This userid will be inherited by all
+\fBcnid_dbd\fR
+daemon processes started\&.
+.RE
+.PP
 \fB\-u\fR\fI group\fR
-Switch to the groupid of \fIgroup\fR
-before serving requests. This groupid will be inherited by all
-\fIcnid_dbd\fR daemon processes started.
-Both \fIuser\fR and \fIgroup\fR
-must be specified as strings.
-.TP 
+.RS 4
+Switch to the groupid of
+\fIgroup\fR
+before serving requests\&. This groupid will be inherited by all
+\fBcnid_dbd\fR
+daemon processes started\&. Both
+\fIuser\fR
+and
+\fIgroup\fR
+must be specified as strings\&.
+.RE
+.PP
 \fB\-s\fR\fI cnid_dbd pathname\fR
-Use \fIcnid_dbd pathname\fR as the
-pathname of the executeable of the \fIcnid_dbd\fR
-daemon. The default is \fI:SBINDIR:/cnid_dbd.\fR
-.SH CAVEATS
-The number of \fIcnid_dbd\fR subprocecesses
-is currently limited to 128. This restriction will be lifted in the
-future.
+.RS 4
+Use
+\fIcnid_dbd pathname\fR
+as the pathname of the executeable of the
+\fBcnid_dbd\fR
+daemon\&. The default is
+\fI:SBINDIR:/cnid_dbd\&.\fR
+.RE
+.SH "CAVEATS"
+.PP
+The number of
+\fBcnid_dbd\fR
+subprocecesses is currently limited to 512\&.
 .PP
-cnid_metad does not block or catch any signals
-apart from SIGPIPE. It will therefore exit on most signals received. This
-will also cause all instances of \fIcnid_dbd's\fR
-started by that cnid_metad to exit gracefully. Since
-state about and IPC access to the subprocesses is only maintained in
-memory by cnid_metad this is desired behaviour. As soon
-as cnid_metad is restarted \fIafpd\fR
-processes will transparently reconnect.
+\fBcnid_metad\fR
+does not block or catch any signals apart from SIGPIPE\&. It will therefore exit on most signals received\&. This will also cause all instances of
+\fBcnid_dbd\'s\fR
+started by that
+\fBcnid_metad\fR
+to exit gracefully\&. Since state about and IPC access to the subprocesses is only maintained in memory by
+\fBcnid_metad\fR
+this is desired behaviour\&. As soon as
+\fBcnid_metad\fR
+is restarted
+\fBafpd\fR
+processes will transparently reconnect\&.
 .SH "SEE ALSO"
+.PP
 \fBcnid_dbd\fR(8),
-\fBafpd\fR(8)
-
+\fBafpd\fR(8),
+\fBdbd\fR(1)