AM_LDFLAGS = -export-dynamic
endif
+CLEANFILES =
DISTCLEANFILES =
EXTRA_DIST =
TESTS =
noinst_PROGRAMS =
noinst_SCRIPTS =
-do_subst = sed -e 's,[@]PKIDIR[@],$(PKIDIR),g' \
- -e 's,[@]RUNDIR[@],$(RUNDIR),g' \
- -e 's,[@]PERL[@],$(PERL),g'
+EXTRA_DIST += README.hwtables
+
+do_subst = ($(srcdir)/subst VLOG_OPTIONS $(srcdir)/lib/vlog.man | \
+ sed -e 's,[@]PKIDIR[@],$(PKIDIR),g' \
+ -e 's,[@]RUNDIR[@],$(RUNDIR),g' \
+ -e 's,[@]PERL[@],$(PERL),g')
ro_script = sed "`printf '1a\\' && printf '\\n\# -*- buffer-read-only: t -*-'`"
-ro_man = printf '.\\" Local\040variables:\n.\\" buffer-read-only: t\n.\\" End:\n'
ro_c = echo '/* -*- mode: c; buffer-read-only: t -*- */'
-EXTRA_DIST += README.hwtables
+SUFFIXES = .in
+.in:
+ $(do_subst) < $< > $@
include lib/automake.mk
include secchan/automake.mk
controller_controller_LDADD = lib/libopenflow.a $(FAULT_LIBS) $(SSL_LIBS)
EXTRA_DIST += controller/controller.8.in
-controller/controller.8: controller/controller.8.in Makefile
- ($(do_subst) && $(ro_man)) \
- < $(srcdir)/controller/controller.8.in \
- > controller/controller.8
.BR \-h ", " \-\^\-help
Prints a brief help message to the console.
-.TP
-\fB-v\fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]], \fB--verbose=\fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]]
-Sets the logging level for \fImodule\fR in \fIfacility\fR to
-\fIlevel\fR. The \fImodule\fR may be any valid module name (as
-displayed by the \fB--list\fR action on \fBvlogconf\fR(8)), or the
-special name \fBANY\fR to set the logging levels for all modules. The
-\fIfacility\fR may be \fBsyslog\fR or \fBconsole\fR to set the levels
-for logging to the system log or to the console, respectively, or
-\fBANY\fR to set the logging levels for both facilities. If it is
-omitted, \fIfacility\fR defaults to \fBANY\fR. The \fIlevel\fR must
-be one of \fBemer\fR, \fBerr\fR, \fBwarn\fR, or \fBdbg\fR, designating
-the minimum severity of a message for it to be logged. If it is
-omitted, \fIlevel\fR defaults to \fBdbg\fR.
-
-.TP
-\fB-v\fR, \fB--verbose\fR
-Sets the maximum logging verbosity level, equivalent to
-\fB--verbose=ANY:ANY:dbg\fR.
-
-.TP
-\fB-vPATTERN:\fIfacility\fB:\fIpattern\fR, \fB--verbose=PATTERN:\fIfacility\fB:\fIpattern\fR
-Sets the log pattern for \fIfacility\fR to \fIpattern\fR. Refer to
-\fBvlogconf\fR(8) for a description of the valid syntax for \fIpattern\fR.
+@VLOG_OPTIONS@
.TP
.BR \-V ", " \-\^\-version
-utilities/vlogconf.8
+_debian/utilities/vlogconf.8
_debian/utilities/ofp-pki.8
_debian/switch/switch.8
_debian/utilities/ofp-discover.8
_debian/utilities/ofp-kill.8
-utilities/dpctl.8
+_debian/utilities/dpctl.8
lib/dh4096.pem \
lib/dhparams.h
+CLEANFILES += lib/dirs.c
lib/dirs.c: Makefile
($(ro_c) && \
echo 'const char ofp_rundir[] = "@RUNDIR@";' && \
--- /dev/null
+.TP
+\fB-v\fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]], \fB--verbose=\fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]]
+
+Sets the logging level for \fImodule\fR in \fIfacility\fR to
+\fIlevel\fR:
+
+.RS
+.IP \(bu
+\fImodule\fR may be any valid module name (as displayed by the
+\fB--list\fR action on \fBvlogconf\fR(8)), or the special name
+\fBANY\fR to set the logging levels for all modules.
+
+.IP \(bu
+\fIfacility\fR may be \fBsyslog\fR, \fBconsole\fR, or \fBfile\fR to
+set the levels for logging to the system log, the console, or a file
+respectively, or \fBANY\fR to set the logging levels for both
+facilities. If it is omitted, \fIfacility\fR defaults to \fBANY\fR.
+
+Regardless of the log levels set for \fBfile\fR, logging to a file
+will not take place unless \fB--log-file\fR is also specified (see
+below).
+
+.IP \(bu
+\fIlevel\fR must be one of \fBemer\fR, \fBerr\fR, \fBwarn\fR, or
+\fBdbg\fR, designating the minimum severity of a message for it to be
+logged. If it is omitted, \fIlevel\fR defaults to \fBdbg\fR.
+.RE
+
+.TP
+\fB-v\fR, \fB--verbose\fR
+Sets the maximum logging verbosity level, equivalent to
+\fB--verbose=ANY:ANY:dbg\fR.
+
+.TP
+\fB-vPATTERN:\fIfacility\fB:\fIpattern\fR, \fB--verbose=PATTERN:\fIfacility\fB:\fIpattern\fR
+Sets the log pattern for \fIfacility\fR to \fIpattern\fR. Refer to
+\fBvlogconf\fR(8) for a description of the valid syntax for \fIpattern\fR.
+
+.TP
+\fB--log-file\fR[\fB=\fIfile\fR]
+Enables logging to a file. If \fIfile\fR is specified, then it is
+used as the exact name for the log file. The default log file name
+used if \fIfile\fR is omitted is @LOGDIR@/\fIprogram\fR.log, where
+\fIprogram\fR is the name of the program as invoked
+(e.g. \fBsecchan\fR).
EXTRA_DIST += secchan/secchan.8.in
DISTCLEANFILES += secchan/secchan.8
-secchan/secchan.8: secchan/secchan.8.in Makefile
- ($(do_subst) && $(ro_man)) \
- < $(srcdir)/secchan/secchan.8.in > secchan/secchan.8
.BR \-h ", " \-\^\-help
Prints a brief help message to the console.
-.TP
-\fB-v\fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]], \fB--verbose=\fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]]
-Sets the logging level for \fImodule\fR in \fIfacility\fR to
-\fIlevel\fR. The \fImodule\fR may be any valid module name (as
-displayed by the \fB--list\fR action on \fBvlogconf\fR(8)), or the
-special name \fBANY\fR to set the logging levels for all modules. The
-\fIfacility\fR may be \fBsyslog\fR or \fBconsole\fR to set the levels
-for logging to the system log or to the console, respectively, or
-\fBANY\fR to set the logging levels for both facilities. If it is
-omitted, \fIfacility\fR defaults to \fBANY\fR. The \fIlevel\fR must
-be one of \fBemer\fR, \fBerr\fR, \fBwarn\fR, or \fBdbg\fR, designating
-the minimum severity of a message for it to be logged. If it is
-omitted, \fIlevel\fR defaults to \fBdbg\fR.
-
-.TP
-\fB-v\fR, \fB--verbose\fR
-Sets the maximum logging verbosity level, equivalent to
-\fB--verbose=ANY:ANY:dbg\fR.
-
-.TP
-\fB-vPATTERN:\fIfacility\fB:\fIpattern\fR, \fB--verbose=PATTERN:\fIfacility\fB:\fIpattern\fR
-Sets the log pattern for \fIfacility\fR to \fIpattern\fR. Refer to
-\fBvlogconf\fR(8) for a description of the valid syntax for \fIpattern\fR.
+@VLOG_OPTIONS@
.TP
.BR \-V ", " \-\^\-version
--- /dev/null
+#! /bin/sh
+exec sed -e "/^@$1@\$/{
+r $2
+d
+}"
EXTRA_DIST += switch/switch.8.in
DISTCLEANFILES += switch/switch.8
-switch/switch.8: switch/switch.8.in Makefile
- ($(do_subst) && $(ro_man)) \
- < $(srcdir)/switch/switch.8.in > switch/switch.8
.BR \-h ", " \-\^\-help
Prints a brief help message to the console.
-.TP
-\fB-v\fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]], \fB--verbose=\fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]]
-Sets the logging level for \fImodule\fR in \fIfacility\fR to
-\fIlevel\fR. The \fImodule\fR may be any valid module name (as
-displayed by the \fB--list\fR action on \fBvlogconf\fR(8)), or the
-special name \fBANY\fR to set the logging levels for all modules. The
-\fIfacility\fR may be \fBsyslog\fR or \fBconsole\fR to set the levels
-for logging to the system log or to the console, respectively, or
-\fBANY\fR to set the logging levels for both facilities. If it is
-omitted, \fIfacility\fR defaults to \fBANY\fR. The \fIlevel\fR must
-be one of \fBemer\fR, \fBerr\fR, \fBwarn\fR, or \fBdbg\fR, designating
-the minimum severity of a message for it to be logged. If it is
-omitted, \fIlevel\fR defaults to \fBdbg\fR.
-
-.TP
-\fB-v\fR, \fB--verbose\fR
-Sets the maximum logging verbosity level, equivalent to
-\fB--verbose=ANY:ANY:dbg\fR.
-
-.TP
-\fB-vPATTERN:\fIfacility\fB:\fIpattern\fR, \fB--verbose=PATTERN:\fIfacility\fB:\fIpattern\fR
-Sets the log pattern for \fIfacility\fR to \fIpattern\fR. Refer to
-\fBvlogconf\fR(8) for a description of the valid syntax for \fIpattern\fR.
+@VLOG_OPTIONS@
.TP
.BR \-V ", " \-\^\-version
noinst_SCRIPTS += utilities/ofp-pki-cgi
EXTRA_DIST += \
+ utilities/dpctl.8.in \
utilities/ofp-discover.8.in \
utilities/ofp-kill.8.in \
utilities/ofp-pki-cgi.in \
utilities/ofp-pki.8.in \
- utilities/ofp-pki.in
+ utilities/ofp-pki.in \
+ utilities/vlogconf.8.in
DISTCLEANFILES += \
+ utilities/dpctl.8 \
utilities/ofp-discover.8 \
utilities/ofp-kill.8 \
utilities/ofp-pki \
+ utilities/ofp-pki.8 \
utilities/ofp-pki-cgi \
- utilities/ofp-pki.8
+ utilities/vlogconf.8
-dist_man_MANS += \
- utilities/vlogconf.8 \
- utilities/dpctl.8
man_MANS += \
- utilities/ofp-pki.8 \
+ utilities/dpctl.8 \
utilities/ofp-discover.8 \
- utilities/ofp-kill.8
+ utilities/ofp-kill.8 \
+ utilities/ofp-pki.8 \
+ utilities/vlogconf.8
utilities_dpctl_SOURCES = utilities/dpctl.c
utilities_dpctl_LDADD = lib/libopenflow.a $(FAULT_LIBS) $(SSL_LIBS)
utilities_ofp_kill_SOURCES = utilities/ofp-kill.c
utilities_ofp_kill_LDADD = lib/libopenflow.a
-
-utilities/ofp-pki: utilities/ofp-pki.in Makefile
- $(do_subst) < $(srcdir)/utilities/ofp-pki.in \
- | $(ro_script) > utilities/ofp-pki
- chmod +x utilities/ofp-pki
-utilities/ofp-pki-cgi: utilities/ofp-pki-cgi.in Makefile
- $(do_subst) < $(srcdir)/utilities/ofp-pki-cgi.in \
- | $(ro_script) > utilities/ofp-pki-cgi
- chmod +x utilities/ofp-pki-cgi
-utilities/ofp-pki.8: utilities/ofp-pki.8.in Makefile
- ($(do_subst) && $(ro_man)) \
- < $(srcdir)/utilities/ofp-pki.8.in > utilities/ofp-pki.8
-utilities/ofp-discover.8: utilities/ofp-discover.8.in Makefile
- ($(do_subst) && $(ro_man)) < $(srcdir)/utilities/ofp-discover.8.in \
- > utilities/ofp-discover.8
-utilities/ofp-kill.8: utilities/ofp-kill.8.in Makefile
- ($(do_subst) && $(ro_man)) < $(srcdir)/utilities/ofp-kill.8.in \
- > utilities/ofp-kill.8
.BR \-h ", " \-\^\-help
Prints a brief help message to the console.
-.TP
-\fB-v\fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]], \fB--verbose=\fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]]
-Sets the logging level for \fImodule\fR in \fIfacility\fR to
-\fIlevel\fR. The \fImodule\fR may be any valid module name (as
-displayed by the \fB--list\fR action on \fBvlogconf\fR(8)), or the
-special name \fBANY\fR to set the logging levels for all modules. The
-\fIfacility\fR may be \fBsyslog\fR or \fBconsole\fR to set the levels
-for logging to the system log or to the console, respectively, or
-\fBANY\fR to set the logging levels for both facilities. If it is
-omitted, \fIfacility\fR defaults to \fBANY\fR. The \fIlevel\fR must
-be one of \fBemer\fR, \fBerr\fR, \fBwarn\fR, or \fBdbg\fR, designating
-the minimum severity of a message for it to be logged. If it is
-omitted, \fIlevel\fR defaults to \fBdbg\fR.
-
-.TP
-\fB-v\fR, \fB--verbose\fR
-Sets the maximum logging verbosity level, equivalent to
-\fB--verbose=ANY:ANY:dbg\fR.
-
-.TP
-\fB-vPATTERN:\fIfacility\fB:\fIpattern\fR, \fB--verbose=PATTERN:\fIfacility\fB:\fIpattern\fR
-Sets the log pattern for \fIfacility\fR to \fIpattern\fR. Refer to
-\fBvlogconf\fR(8) for a description of the valid syntax for \fIpattern\fR.
+@VLOG_OPTIONS@
.TP
.BR \-V ", " \-\^\-version
.BR \-h ", " \-\^\-help
Prints a brief help message to the console.
-.TP
-\fB-v\fR \fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]], \fB--verbose=\fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]]
-Sets the logging level for \fImodule\fR in \fIfacility\fR to
-\fIlevel\fR. The \fImodule\fR may be any valid module name (as
-displayed by the \fB--list\fR action on \fBvlogconf\fR(8)), or the
-special name \fBANY\fR to set the logging levels for all modules. The
-\fIfacility\fR may be \fBsyslog\fR or \fBconsole\fR to set the levels
-for logging to the system log or to the console, respectively, or
-\fBANY\fR to set the logging levels for both facilities. If it is
-omitted, \fIfacility\fR defaults to \fBANY\fR. The \fIlevel\fR must
-be one of \fBemer\fR, \fBerr\fR, \fBwarn\fR, or \fBdbg\fR, designating
-the minimum severity of a message for it to be logged. If it is
-omitted, \fIlevel\fR defaults to \fBdbg\fR.
-
-.TP
-\fB-v\fR, \fB--verbose\fR
-Sets the maximum logging verbosity level, equivalent to
-\fB--verbose=ANY:ANY:dbg\fR.
-
-.TP
-\fB-vPATTERN:\fIfacility\fB:\fIpattern\fR, \fB--verbose=PATTERN:\fIfacility\fB:\fIpattern\fR
-Sets the log pattern for \fIfacility\fR to \fIpattern\fR. Refer to
-\fBvlogconf\fR(8) for a description of the valid syntax for \fIpattern\fR.
+@VLOG_OPTIONS@
.TP
.BR \-V ", " \-\^\-version
[\fB-l\fR | \fB--list\fR] [\fB-s\fR
\fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]] |
\fB--set=\fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]]]
+[\fB-r\fR | \fB--reopen\fR]
.SH DESCRIPTION
The \fBvlogconf\fR program configures the logging system used by
All running processes that \fBvlogconf\fR can control.
.TP
-\fB-t \fIpid\fR, \fB--target=\fIpid\fR
-The process with the specified \fIpid\fR. \fIpid\fR may also specify
-an absolute path (beginning with `/') to the Unix domain socket for a
+\fB-t \fItarget\fR, \fB--target=\fItarget\fR
+The specified \fItarget\fR, which must take one of the following forms:
+
+.RS
+.IP \(bu
+A PID (process ID).
+
+.IP \(bu
+An absolute path (beginning with `/') to the Unix domain socket for a
\fBvlogconf\fR-controllable process.
+.IP \(bu
+An absolute path (beginning with `/') to a pidfile (created by, e.g.,
+passing the \fB-P\fR or \fB--pidfile\fR option to one of the OpenFlow
+programs).
+
+.IP \(bu
+None of the above, in which case \fItarget\fR prefixed by
+\fB@RUNDIR@/\fR must match one of the cases for absolute paths listed
+above. (The default name for a program's pidfile is
+\fB@RUNDIR@/\fIprogram\fB.pid\fR, so this means that, say,
+\fBsecchan\fR's default pidfile may be referred to simply as
+\fBsecchan.pid\fR.)
+.RE
+
.PP
The available actions are:
The default pattern for console output is \fB%d{%b %d
%H:%M:%S}|%05N|%c|%p|%m\fR; for syslog output, \fB%05N|%c|%p|%m\fR.
+.TP
+\fB-r\fR, \fB--reopen\fR
+Causes the target application to close and reopen its log file. (This
+is useful after rotating log files, to cause a new log file to be
+used.)
+
.SH OPTIONS
.TP
\fB\-h\fR, \fB\-\^\-help\fR