mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
ifupdown2 code was one level deeper because ifupdown2 initially had ifupdown2 and ifupdown2-addons as two separate packages. Since they were combined into one package, it makes sense to move all combined code under the top level directory Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
231 lines
5.3 KiB
Groff
231 lines
5.3 KiB
Groff
.\" Man page generated from reStructeredText.
|
|
.
|
|
.TH IFQUERY 8 "2014-02-05" "0.1" ""
|
|
.SH NAME
|
|
ifquery \- query network interface configuration
|
|
.
|
|
.nr rst2man-indent-level 0
|
|
.
|
|
.de1 rstReportMargin
|
|
\\$1 \\n[an-margin]
|
|
level \\n[rst2man-indent-level]
|
|
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
-
|
|
\\n[rst2man-indent0]
|
|
\\n[rst2man-indent1]
|
|
\\n[rst2man-indent2]
|
|
..
|
|
.de1 INDENT
|
|
.\" .rstReportMargin pre:
|
|
. RS \\$1
|
|
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
|
|
. nr rst2man-indent-level +1
|
|
.\" .rstReportMargin post:
|
|
..
|
|
.de UNINDENT
|
|
. RE
|
|
.\" indent \\n[an-margin]
|
|
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
.nr rst2man-indent-level -1
|
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
|
..
|
|
.SH SYNOPSIS
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
\fBifquery [\-v] [\-\-allow CLASS] [\-\-with\-depends] \-a|IFACE...\fP
|
|
.sp
|
|
\fBifquery [\-v] [\-r|\-\-running] [\-\-allow CLASS] [\-\-with\-depends] \-a|IFACE...\fP
|
|
.sp
|
|
\fBifquery [\-v] [\-c|\-\-check] [\-\-allow CLASS] [\-\-with\-depends] \-a|IFACE...\fP
|
|
.sp
|
|
\fBifquery [\-v] [\-p|\-\-print\-dependency {list,dot}] [\-\-allow CLASS] [\-\-with\-depends] \-a|IFACE...\fP
|
|
.sp
|
|
\fBifquery [\-v] \-s|\-\-syntax\-help\fP
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SH DESCRIPTION
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
\fBifquery\fP can be used to parse interface configuration file, query
|
|
running state or check running state of the interface with configuration
|
|
in \fB/etc/network/interfaces\fP file.
|
|
.sp
|
|
\fBifquery\fP always works on the current \fBinterfaces(5)\fP file
|
|
\fB/etc/network/interfaces\fP unless an alternate interfaces file is
|
|
provided with the \fB\-i\fP option.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SH OPTIONS
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
positional arguments:
|
|
.sp
|
|
\fBIFACE\fP interface list separated by spaces. \fBIFACE\fP list and \fB\(aq\-a\(aq\fP argument are mutually exclusive.
|
|
.sp
|
|
optional arguments:
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-h, \-\-help
|
|
show this help message and exit
|
|
.TP
|
|
.B \-a, \-\-all
|
|
process all interfaces marked "auto"
|
|
.TP
|
|
.B \-v, \-\-verbose
|
|
verbose
|
|
.TP
|
|
.B \-d, \-\-debug
|
|
output debug info
|
|
.TP
|
|
.BI \-\-allow \ CLASS
|
|
ignore non\-"allow\-CLASS" interfaces
|
|
.TP
|
|
.B \-w, \-\-with\-depends
|
|
run with all dependent interfaces. This option
|
|
is redundant when \-a is specified. When \(aq\-a\(aq is
|
|
specified, interfaces are always executed in
|
|
dependency order.
|
|
.TP
|
|
.BI \-X \ EXCLUDEPATS, \ \-\-exclude \ EXCLUDEPATS
|
|
Exclude interfaces from the list of interfaces to
|
|
operate on. Can be specified multiple times
|
|
.TP
|
|
.BI \-i \ INTERFACESFILE, \ \-\-interfaces \ INTERFACESFILE
|
|
Use interfaces file instead of default
|
|
/etc/network/interfaces
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-t {native,json}, \-\-interfaces\-format {native,json}
|
|
interfaces file format
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-r, \-\-running
|
|
print raw interfaces file entries
|
|
.TP
|
|
.B \-c, \-\-check
|
|
check interface file contents against running state
|
|
of an interface. Returns exit code 0 on success and
|
|
1 on error
|
|
.TP
|
|
.B \-x, \-\-raw
|
|
print raw config file entries
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-o {native,json}, \-\-format {native,json}
|
|
interface display format
|
|
.TP
|
|
.B \-p, \-\-print\-dependency {list,dot}
|
|
print iface dependency in list or dot format
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-s, \-\-syntax\-help
|
|
print supported interface config syntax. Scans all
|
|
addon modules and dumps supported syntax from them
|
|
if provided by the module.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SH EXAMPLES
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
# dump all or some interfaces config file entries
|
|
# (pretty prints user provided entries)
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
\fBifquery \-a\fP
|
|
.sp
|
|
\fBifquery br0\fP
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
# Same as above but dump with dependencies
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
\fBifquery br0 \-\-with\-depends\fP
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
# Check running state with the config in /etc/network/interfaces
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
\fBifquery \-\-check br0\fP
|
|
.sp
|
|
\fBifquery \-\-check \-\-with\-depends br0\fP
|
|
.sp
|
|
\fBifquery \-\-check \-a\fP
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
# dump running state of all interfaces in /etc/network/interfaces format
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
\fBifquery \-\-running br0\fP
|
|
.sp
|
|
\fBifquery \-\-running \-\-with\-depends br0\fP
|
|
.sp
|
|
\fBifquery \-\-running \-a\fP
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
# print dependency info in list format
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
\fBifquery \-\-print\-dependency=list \-a\fP
|
|
.sp
|
|
\fBifquery \-\-print\-dependency=list br2000\fP
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
# print dependency info in dot format
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
\fBifquery \-\-print\-dependency=dot \-a\fP
|
|
.sp
|
|
\fBifquery \-\-print\-dependency=dot br2000\fP
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
# Create an image (png) from the dot format
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
\fBifquery \-\-print\-dependency=dot \-a > interfaces.dot\fP
|
|
.sp
|
|
\fBdot \-Tpng interfaces.dot > interfaces.png\fP
|
|
.sp
|
|
(The above command only works on a system with dot installed)
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SH KNOWN_ISSUES
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
\fBifquery \-\-check\fP is currently experimental
|
|
.sp
|
|
\fBifquery \-\-check\fP cannot validate usercommands given under pre\-up, post\-up etc
|
|
There is currently no support to check/validate ethtool iface attributes
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SH SEE ALSO
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
ifup(8),
|
|
ifdown(8),
|
|
ifreload(8),
|
|
interfaces(5),
|
|
ifupdown\-addons\-interfaces(5)
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SH AUTHOR
|
|
Roopa Prabhu <roopa@cumulusnetworks.com>
|
|
.SH COPYRIGHT
|
|
Copyright 2014 Cumulus Networks, Inc. All rights reserved.
|
|
.\" Generated by docutils manpage writer.
|
|
.\"
|
|
.
|