VERSION = 1.1.1
BINSCRIPTS = \
- cdb-assign cdb-list check-sender unfwd \
+ cdb-assign cdb-map cdb-list check-sender unfwd \
splitconf z buf create inplace
SBINSCRIPTS = shadowfix
SCRIPTS = $(BINSCRIPTS) $(SBINSCRIPTS)
PERLLIBS = MdwOpt.pm
LIBS = xtitle.so
DISTMAN1 = \
- not.1 z.1 cdb-assign.1 cdb-list.1 cdb-probe.1 cdb-check-domain.1 \
+ not.1 z.1 cdb-assign.1 cdb-map.1 cdb-list.1 cdb-probe.1 \
+ cdb-check-domain.1 \
gorp.1 unfwd.1 splitconf.1 locking.1 if-mtu.1 pause.1 \
buf.1 create.1 inplace.1
MAN1 = $(DISTMAN1)
--- /dev/null
+#! /usr/bin/perl
+
+use CDB_File;
+
+@ARGV >= 1 or die "usage: $0 CDB [INPUT ...]\n";
+$f = shift;
+$c = CDB_File->new($f, "$f.new") or die "CDB_File->new: $!\n";
+while (<>) {
+ chomp;
+ m'^([^:]*):(.*)$' or die "bad assignment `$_'\n";
+ $c->insert($1, $2);
+}
+$c->finish() or die "CDB_File->finish: $!\n";
+exit 0;
--- /dev/null
+.\" -*-nroff-*-
+.TH cdb-assign 1 "9 October 2003" "Straylight/Edgeware"
+.SH SYNOPSIS
+.B cdb-assign
+.I cdb
+.RI [ input ...]
+.SH DESCRIPTION
+Constructs a CDB file (see
+.BR cdbmake (1),
+.BR cdbget (1))
+from mappings in the
+.I input
+files (or stdin if there are none).
+.PP
+No comments or blank lines are allowed. Lines must have the form
+.RI ` key \c
+.BR : \c
+.IR value '.
+Whitespace is preserved. This is intended to be used with autogenerated
+files rather than human-written ones.
+.PP
+The CDB file is written to
+.IB cdb .new
+and renamed to
+.I cdb
+when it's finished.
+.SH BUGS
+None known.
+.SH AUTHOR
+Mark Wooding, <mdw@nsict.org>
buf.1 buf /usr/share/man/man1
cdb-assign nsict-cdb /usr/bin
cdb-assign.1 nsict-cdb /usr/share/man/man1
+cdb-map nsict-cdb /usr/bin
+cdb-map.1 nsict-cdb /usr/share/man/man1
cdb-check-domain nsict-cdb /usr/bin
cdb-check-domain.1 nsict-cdb /usr/share/man/man1
cdb-list nsict-cdb /usr/bin