The following changes were made:
* Completely re-written as shell script * Modified documentation to better reflect reality * Removed the rather useless 'ifquery' tool
This commit is contained in:
8
Makefile
8
Makefile
@@ -8,19 +8,19 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
DEPENDS = dhclient,iproute2,perl
|
DEPENDS = dhclient,iproute2
|
||||||
ARCH = none
|
ARCH = none
|
||||||
URL =
|
URL =
|
||||||
BRIEF = Scripts for starting and stopping network interfaces
|
BRIEF = Scripts for starting and stopping network interfaces
|
||||||
DESC = Scripts which use the iproute2 tools for automatically starting and \
|
DESC = Scripts which use the iproute2 tools for automatically starting and \
|
||||||
stopping network devices during startup.
|
stopping network devices during startup.
|
||||||
SNAPVER = 2
|
SNAPVER = 0
|
||||||
|
|
||||||
ARCHIVE :=
|
ARCHIVE :=
|
||||||
SRCDIR := $(PWD)/SRC/iftools
|
SRCDIR := $(PWD)/SRC/iftools
|
||||||
PATCHDIR := $(PWD)/SRC/patches
|
PATCHDIR := $(PWD)/SRC/patches
|
||||||
VERSION := $(shell grep 'VERSION\s*=>' SRC/iftools/ifup| \
|
VERSION := $(shell grep 'VERSION=' SRC/iftools/ifup| \
|
||||||
cut -d "'" -f2)-$(SNAPVER)
|
cut -d "=" -f2)-$(SNAPVER)
|
||||||
|
|
||||||
include /usr/share/snap/Makefile.snaplinux
|
include /usr/share/snap/Makefile.snaplinux
|
||||||
|
|
||||||
|
|||||||
@@ -16,10 +16,8 @@ files:
|
|||||||
|
|
||||||
links:
|
links:
|
||||||
ln -s ifup.8 $(DESTDIR)/usr/share/man/man8/ifdown.8
|
ln -s ifup.8 $(DESTDIR)/usr/share/man/man8/ifdown.8
|
||||||
ln -s ifup.8 $(DESTDIR)/usr/share/man/man8/ifquery.8
|
|
||||||
ln -s ifup.8 $(DESTDIR)/usr/share/man/man8/ifreload.8
|
ln -s ifup.8 $(DESTDIR)/usr/share/man/man8/ifreload.8
|
||||||
ln -s ifup $(DESTDIR)/sbin/ifdown
|
ln -s ifup $(DESTDIR)/sbin/ifdown
|
||||||
ln -s ifup $(DESTDIR)/sbin/ifquery
|
|
||||||
ln -s ifup $(DESTDIR)/sbin/ifreload
|
ln -s ifup $(DESTDIR)/sbin/ifreload
|
||||||
|
|
||||||
install: dirs files links
|
install: dirs files links
|
||||||
|
|||||||
1328
SRC/iftools/ifup
1328
SRC/iftools/ifup
File diff suppressed because it is too large
Load Diff
@@ -5,30 +5,25 @@ ifup \- bring a network interface up
|
|||||||
ifdown \- take a network interface down
|
ifdown \- take a network interface down
|
||||||
.br
|
.br
|
||||||
ifreload \- reload interface configuration
|
ifreload \- reload interface configuration
|
||||||
.br
|
|
||||||
ifquery \- view current state of interfaces
|
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B ifup
|
.B ifup
|
||||||
\f |
|
\f |
|
||||||
.B ifdown
|
.B ifdown
|
||||||
\f |
|
\f |
|
||||||
.B ifreload
|
.B ifreload
|
||||||
\f |
|
|
||||||
.B ifquery
|
|
||||||
\f <OPTIONS> <INTERFACES>
|
\f <OPTIONS> <INTERFACES>
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
The
|
The
|
||||||
.BR ifup " and " ifdown
|
.BR ifup " and " ifdown
|
||||||
commands may be used to configure (or, respectively, deconfigure) network
|
commands may be used to configure, or deconfigure network
|
||||||
interfaces based on interface definitions in the file
|
interfaces based on interface definitions in the file
|
||||||
.IR /etc/network.conf ". The"
|
.IR /etc/network.conf ". The"
|
||||||
.BR ifreload " command will perform an ifdown and ifup in one command."
|
.BR ifreload " command will perform an ifdown and ifup in one command."
|
||||||
.BR ifquery " may be used to display the running configuration."
|
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
A summary of options is included below.
|
A summary of options is included below.
|
||||||
.TP
|
.TP
|
||||||
.BR \-a ", " \-\-all
|
.BR \-a
|
||||||
If given to \fBifup\fP, affect all interfaces marked \fBauto\fP.
|
If given to \fBifup\fP, all interfaces marked \fBauto\fP are brought online.
|
||||||
Interfaces are brought up in the order in which they are defined
|
Interfaces are brought up in the order in which they are defined
|
||||||
in
|
in
|
||||||
.IR /etc/network.conf .
|
.IR /etc/network.conf .
|
||||||
@@ -36,17 +31,17 @@ If given to \fBifdown\fP, affect all defined interfaces.
|
|||||||
Interfaces are brought down in the order in which they are
|
Interfaces are brought down in the order in which they are
|
||||||
listed in the configuration files.
|
listed in the configuration files.
|
||||||
.TP
|
.TP
|
||||||
.BR \-h ", " \-\-help
|
.BR \-h
|
||||||
Show summary of options.
|
Show summary of options.
|
||||||
.TP
|
.TP
|
||||||
.BR \-n ", " \-\-no\-act
|
.BR \-n
|
||||||
Don't configure any interfaces or run any "up" or "down" commands.
|
Take no action, but output commands that would be executed.
|
||||||
.TP
|
.TP
|
||||||
.BR \-V ", " \-\-version
|
.BR \-v
|
||||||
Show copyright and version information.
|
Show configuration steps as they are taken.
|
||||||
.TP
|
.TP
|
||||||
.BR \-v ", " \-\-verbose
|
.BR \-V
|
||||||
Show commands as they are executed.
|
Show version information.
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
.TP
|
.TP
|
||||||
.B ifup -a
|
.B ifup -a
|
||||||
@@ -62,25 +57,17 @@ Bring up interface
|
|||||||
.TP
|
.TP
|
||||||
.B ifdown -a
|
.B ifdown -a
|
||||||
Bring down all interfaces that are currently up.
|
Bring down all interfaces that are currently up.
|
||||||
.TP
|
|
||||||
.B ifquery eth0
|
|
||||||
Print the running configuration of eth0
|
|
||||||
.SH NOTES
|
.SH NOTES
|
||||||
.BR ifup ,
|
.BR ifup ,
|
||||||
.BR ifdown ,
|
.BR ifdown ,
|
||||||
.BR ifreload ,
|
|
||||||
and
|
and
|
||||||
.BR ifquery
|
.BR ifreload
|
||||||
are actually the same program called by different names.
|
are actually the same program called by different names.
|
||||||
.P
|
.P
|
||||||
The program does not configure network interfaces directly;
|
The program does not configure network interfaces directly;
|
||||||
it runs low level utilities such as
|
it runs low level utilities such as
|
||||||
.BR ip
|
.BR ip
|
||||||
to do its dirty work.
|
to do its dirty work.
|
||||||
.P
|
|
||||||
When invoked a check will be performed to verify that there
|
|
||||||
are no other instances running. If another instance is
|
|
||||||
detected the program will exit with an error.
|
|
||||||
.SH FILES
|
.SH FILES
|
||||||
.TP
|
.TP
|
||||||
.I /etc/network.conf
|
.I /etc/network.conf
|
||||||
@@ -88,9 +75,6 @@ definitions of network interfaces
|
|||||||
See
|
See
|
||||||
.BR network.conf (5)
|
.BR network.conf (5)
|
||||||
for more information.
|
for more information.
|
||||||
.TP
|
|
||||||
.I /run/network/ifstate
|
|
||||||
current state of network interfaces
|
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
iftools was written by Jay Larson <jlarson@snaplinux.org>. The functionality is loosely based on the ifupdown suite written by Anthony Towns <aj@azure.humbug.org.au>.
|
iftools was written by Jay Larson <jlarson@snaplinux.org>. The functionality is loosely based on the ifupdown suite written by Anthony Towns <aj@azure.humbug.org.au>.
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
|
|||||||
@@ -46,8 +46,8 @@ There can be multiple "auto" stanzas.
|
|||||||
brings the named interfaces up in the order listed.
|
brings the named interfaces up in the order listed.
|
||||||
.P
|
.P
|
||||||
Lines beginning with "source-directory" are used to source multiple
|
Lines beginning with "source-directory" are used to source multiple
|
||||||
files at once. All non-dotted files within the directory are sourced
|
files at once. All non-dotted files ending in .conf within the directory
|
||||||
in lexical order.
|
are sourced in lexical order.
|
||||||
.P
|
.P
|
||||||
When sourcing directories, if a path doesn't have a leading slash
|
When sourcing directories, if a path doesn't have a leading slash
|
||||||
it's considered relative to the directory containing the network.conf
|
it's considered relative to the directory containing the network.conf
|
||||||
|
|||||||
Reference in New Issue
Block a user