]> arthur.barton.de Git - netatalk.git/commitdiff
Introduce default values for host, port and cnid_dbd
authorlenneis <lenneis>
Mon, 1 Dec 2003 22:23:12 +0000 (22:23 +0000)
committerlenneis <lenneis>
Mon, 1 Dec 2003 22:23:12 +0000 (22:23 +0000)
executeable in cnid_metad. Manual pages cnid_metad and cnid_dbd.

etc/cnid_dbd/Makefile.am
etc/cnid_dbd/cnid_metad.c
man/man8/Makefile.am
man/man8/cnid_metad.8.tmpl [new file with mode: 0644]

index 432d643b5f887061a68e215ac77126da2f73b38e..08929d3920332bcb5ef23546c6caf3891e0ab850 100644 (file)
@@ -23,5 +23,5 @@ EXTRA_DIST = README
 LIBS = @LIBS@ @BDB_LIBS@
 
 
-CFLAGS = -I$(top_srcdir)/include @CFLAGS@ @BDB_CFLAGS@ 
-
+CFLAGS = -I$(top_srcdir)/include @CFLAGS@ @BDB_CFLAGS@ \
+         -D_PATH_CNID_DBD=\"$(sbindir)/cnid_dbd\"
index b8e2f88a044529f064907a30cdeffa1458f2701d..affe50c17aaebdfc716333ae6a247d1291573231 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_metad.c,v 1.1.4.6 2003-11-25 13:28:54 lenneis Exp $
+ * $Id: cnid_metad.c,v 1.1.4.7 2003-12-01 22:23:12 lenneis Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYRIGHT.
@@ -98,6 +98,9 @@ static int rqstfd;
 #define MAXSPAWN   3                   /* Max times respawned in.. */
 #define TESTTIME   20                  /* this much seconds */
 
+#define DEFAULTHOST  "localhost"
+#define DEFAULTPORT  4700
+
 struct server {
     char  *name;
     pid_t pid;
@@ -326,9 +329,9 @@ int main(int argc, char *argv[])
     int   len;
     pid_t pid;
     int   status;
-    char  *dbdpn = NULL;
-    char  *host = NULL;
-    int   port = 0;
+    char  *dbdpn = _PATH_CNID_DBD;
+    char  *host = DEFAULTHOST;
+    int   port = DEFAULTPORT;
     struct db_param *dbp;
     int    i;
     int    cc;
@@ -372,7 +375,7 @@ int main(int argc, char *argv[])
         }
     }
     
-    if (err || !host || !port || !dbdpn) {
+    if (err) {
         LOG(log_error, logtype_cnid, "main: bad arguments");
         exit(1);
     }
index b0748bb5b4faad5d60fa4a88f4c5a981d1ef0a03..fc57b4e4437d0c0d48292ea511cddb24d0305cc0 100644 (file)
@@ -14,7 +14,7 @@ SUFFIXES = .tmpl .
            <$< >$@
 
 NONGENERATED_MANS = timelord.8
-GENERATED_MANS    = afpd.8 atalkd.8 papd.8 papstatus.8 psf.8
+GENERATED_MANS    = afpd.8 atalkd.8 cnid_dbd.8 cnid_metad.8 papd.8 papstatus.8 psf.8
 TEMPLATE_FILES    = $(foreach f,$(GENERATED_MANS),$(f).tmpl)
 
 man_MANS = $(GENERATED_MANS) $(NONGENERATED_MANS)
diff --git a/man/man8/cnid_metad.8.tmpl b/man/man8/cnid_metad.8.tmpl
new file mode 100644 (file)
index 0000000..797c9d3
--- /dev/null
@@ -0,0 +1,135 @@
+.TH CNID_METAD 8 "28 Nov 2003" ":NETATALK_VERSION:"
+
+.SH NAME
+cnid_metad \- start cnid_dbd daemons on request
+.SH SYNOPSIS
+.B cnid_metad
+[
+.B -d
+]
+[
+.B -h
+.I hostname
+]
+[
+.B -p
+.I port
+]
+[
+.B -u
+.I user
+]
+[
+.B -g
+.I group
+]
+[
+.B -s
+.I cnid_dbd pathname
+]
+.SH DESCRIPTION
+.B cnid_metad
+waits for requests from
+.BR afpd
+to start up instances of the
+.BR cnid_dbd
+daemon. It keeps track of the status of a 
+.BR cnid_dbd
+instance once started and will restart it if necessary.
+.B cnid_metad
+is normally started at boot time from
+.BR /etc/rc
+or equivalent and runs until shutdown.
+.BR afpd
+needs to be configured with the 
+.B -cnidserver
+option in
+.BR afpd.conf 
+in order to access
+.B cnid_metad.
+It is possible to run more than one instance of
+.B cnid_metad
+on the same machine if different values for the interface and/or port are specified with the
+.B -h
+and
+.B -p
+options.
+
+.SH OPTIONS 
+.TP 
+.B \-d 
+.B cnid_metad will remain in the foreground and
+will also leave the standard input, standard output and standard error
+file descriptors open. Useful for debugging.  
+.TP 
+.BI \-h " hostname"
+Use 
+.I hostname 
+as the network interface for requests as opposed to
+the default 
+.B "localhost".  
+.TP 
+.BI \-p " port" 
+Use 
+.I port 
+as the
+port number for reqests. Default is 4700.  
+.TP 
+.BI \-u " user" 
+Switch to the userid of 
+.I user 
+before serving requests. This userid will be
+inherited by all 
+.BR cnid_dbd 
+daemon processes started.  
+.TP 
+.BI \-u " group" 
+Switch to the groupid of 
+.I group 
+before serving requests. This groupid will be inherited by all 
+.BR cnid_dbd 
+daemon processes started. Both 
+.I user 
+and 
+.I group 
+must be specified as strings.  
+.TP
+.BI \-s " cnid_dbd pathname" 
+Use 
+.I cnid_dbd pathname 
+as the pathname
+of the executeable of the 
+.BR cnid_dbd 
+daemon. The default is 
+.IR :SBINDIR:/cnid_dbd.  
+.SH CAVEATS 
+The number of 
+.BR cnid_dbd
+subprocecesses is currently limited to 128. This restriction will be
+lifted in the future.
+.LP
+.B 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 
+.BR cnid_dbd's
+started by that 
+.B cnid_metad
+to exit gracefully. 
+Since state about and IPC access to the
+subprocesses is only maintained in memory by 
+.B cnid_metad
+this is desired behaviour. As soon as 
+.B cnid_metad
+is restarted 
+.BR afpd
+processes will transparently reconnect.
+
+.SH SEE ALSO
+.BR cnid_dbd (1),
+.BR afpd (8)
+
+
+
+
+
+