1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

Document ifreload new option + add it into init.d networking script

Ticket:
Reviewed By: trivial
Testing Done: Tested build/install/boot + ifupdown2 sanity
This commit is contained in:
Roopa Prabhu
2015-01-03 00:27:35 -08:00
parent 782fa53938
commit d462f1fa2d
3 changed files with 27 additions and 2 deletions

View File

@@ -166,12 +166,21 @@ reload)
log_action_end_msg $?
;;
reload-currently-up)
ifupdown_init
log_action_begin_msg "Reloading currently up network interfaces configuration"
ifreload --currently-up $EXTRA_ARGS
log_action_end_msg $?
;;
force-reload)
ifupdown_init
log_action_begin_msg "Reloading network interfaces configuration"
ifreload -a
ifreload -f -a $EXTRA_ARGS
log_action_end_msg $?
;;

View File

@@ -14,7 +14,7 @@ reload network interface configuration
SYNOPSIS
========
ifreload [-h] -a [-v] [-d] [-f] [-n]
ifreload [-h] (-a|-c) [-v] [-d] [-f] [-n]
DESCRIPTION
===========
@@ -27,6 +27,10 @@ DESCRIPTION
but it skips **ifdown** for interfaces that did not change in the config
file.
If you do not wish to execute **down** on any interfaces, but only **up** on
interfaces that were already **up**, please see the **--currently-up**
option below.
OPTIONS
=======
@@ -40,6 +44,11 @@ OPTIONS
-f, --force force run all operations
-c, --currently-up only reload auto and other interfaces that are
currently up. This can be used as a non-disruptive
alternative to -a because it will not down any
interfaces
EXAMPLES
========
# reload all auto interfaces in **interfaces(5)** file
@@ -50,6 +59,10 @@ EXAMPLES
**service networking reload**
# reload all currently up interfaces without bringing any interfaces down
**service networking reload-currently-up**
SEE ALSO
========
ifup(8),

View File

@@ -353,6 +353,9 @@ def update_ifreload_argparser(argparser):
argparser.add_argument('-l', '--syslog', dest='syslog',
action='store_true',
help=argparse.SUPPRESS)
argparser.add_argument('-f', '--force', dest='force',
action='store_true',
help='force run all operations')
def parse_args(argsv, op):
if op == 'query':