mirror of
				https://github.com/CumulusNetworks/ifupdown2.git
				synced 2024-05-06 15:54:50 +00:00 
			
		
		
		
	Ticket: CM-7995 Reviewed By: CCR-3850 Testing Done: Tested exit code on syntax errors This patch adds members 'errors' and 'warns' to networkinterfaces.py to track errors and warns during parsing interfaces file. This patch also adds --syntax-check option to ifreload given people seem to use ifreload more than ifup these days. $ ifreload --syntax-check -a error: /etc/network/interfaces: iface swp1.200: unsupported keyword (roopa-attr) $ echo $? 1 (cherry picked from commit e643a136fcf5d387ff0f9a31cb6a6af4983e1012)
		
			
				
	
	
		
			88 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			ReStructuredText
		
	
	
	
	
	
			
		
		
	
	
			88 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			ReStructuredText
		
	
	
	
	
	
========
 | 
						|
ifreload
 | 
						|
========
 | 
						|
 | 
						|
--------------------------------------
 | 
						|
reload network interface configuration
 | 
						|
--------------------------------------
 | 
						|
 | 
						|
:Author: Roopa Prabhu <roopa@cumulusnetworks.com>
 | 
						|
:Date:   2014-02-05
 | 
						|
:Copyright: Copyright 2014 Cumulus Networks, Inc.  All rights reserved.
 | 
						|
:Version: 0.1
 | 
						|
:Manual section: 8
 | 
						|
 | 
						|
SYNOPSIS
 | 
						|
========
 | 
						|
    ifreload [-h] (-a|-c) [-v] [-d] [-f] [-n] [-s]
 | 
						|
 | 
						|
DESCRIPTION
 | 
						|
===========
 | 
						|
    reloads network **interfaces(5)** file **/etc/network/interfaces**
 | 
						|
    or config file defined in ifupdown2.conf file.
 | 
						|
 | 
						|
    Runs **ifdown** on interfaces that were removed from the file and
 | 
						|
    subsequently runs **ifup** on all interfaces.
 | 
						|
 | 
						|
    When removing an interface (iface section) from the interfaces file
 | 
						|
    please make sure all its references are removed as well. Similarly
 | 
						|
    when renaming an interface, please make sure all references to the
 | 
						|
    interface are changed to the new name. Renaming an interface
 | 
						|
    in the interfaces file results in ifdown of the old and ifup
 | 
						|
    of the interface with the new name.
 | 
						|
 | 
						|
    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
 | 
						|
=======
 | 
						|
    -h, --help            show this help message and exit
 | 
						|
 | 
						|
    -a, --all             process all interfaces marked "auto"
 | 
						|
 | 
						|
    -v, --verbose         verbose
 | 
						|
 | 
						|
    -d, --debug           output debug info
 | 
						|
 | 
						|
    -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
 | 
						|
 | 
						|
    -X EXCLUDEPATS, --exclude EXCLUDEPATS
 | 
						|
                          Exclude interfaces from the list of interfaces to
 | 
						|
                          operate on. Can be specified multiple times
 | 
						|
                          If the excluded interface has dependent interfaces,
 | 
						|
                          (e.g. a bridge or a bond with multiple enslaved interfaces)
 | 
						|
                          then each dependent interface must be specified in order
 | 
						|
                          to be excluded.
 | 
						|
 | 
						|
    -s, --syntax-check    Only run the interfaces file parser
 | 
						|
 | 
						|
 | 
						|
EXAMPLES
 | 
						|
========
 | 
						|
    # reload all auto interfaces in **interfaces(5)** file
 | 
						|
 | 
						|
    **ifreload -a**
 | 
						|
 | 
						|
    # reload all interfaces using service command
 | 
						|
 | 
						|
    **service networking reload**
 | 
						|
 | 
						|
    # reload all currently up interfaces without bringing any interfaces down
 | 
						|
 | 
						|
    **service networking reload-currently-up**
 | 
						|
 | 
						|
SEE ALSO
 | 
						|
========
 | 
						|
    ifup(8),
 | 
						|
    ifdown(8),
 | 
						|
    ifquery(8),
 | 
						|
    interfaces(5),
 | 
						|
    ifupdown-addons-interfaces(5)
 |