mirror of
				https://github.com/CumulusNetworks/ifupdown2.git
				synced 2024-05-06 15:54:50 +00:00 
			
		
		
		
	This is a major update coming all at once from master-next branch
master-next branch was started with --orphan option which is basically a new
branch without history.
The major changes are:
    - repackaging
    - cleanup the directory tree
    - rewritte setup.py to allow install from deb file or pypi (pip install)
    - add a Makefile to make things (like building a deb) easier
    - review all debian files
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
		
	
		
			
				
	
	
		
			47 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
#!/bin/sh
 | 
						|
set -e
 | 
						|
 | 
						|
MYNAME="${0##*/}"
 | 
						|
 | 
						|
report() { echo "${MYNAME}: $*" ; }
 | 
						|
report_warn() { report "Warning: $*" >&2 ; }
 | 
						|
report_err() { report "Error: $*" >&2 ; }
 | 
						|
 | 
						|
process_state_file()
 | 
						|
{
 | 
						|
    rm -f /run/network/ifstatenew
 | 
						|
}
 | 
						|
 | 
						|
process_udev()
 | 
						|
{
 | 
						|
    if [ -e /etc/udev/rules.d/80-networking.rules ]; then
 | 
						|
	udevlink=$(readlink /etc/udev/rules.d/80-networking.rules 2>/dev/null || true)
 | 
						|
	[ -n "$udevlink" -a "$udevlink" = "/dev/null" ] && rm -f /etc/udev/rules.d/80-networking.rules
 | 
						|
    fi
 | 
						|
 | 
						|
    if  [ -e /etc/udev/rules.d/60-bridge-network-interface.rules ]; then
 | 
						|
	udevlink=$(readlink /etc/udev/rules.d/60-bridge-network-interface.rules 2>/dev/null || true)
 | 
						|
	[ -n "$udevlink" -a "$udevlink" = "/dev/null" ] && rm -f /etc/udev/rules.d/60-bridge-network-interface.rules
 | 
						|
    fi
 | 
						|
}
 | 
						|
 | 
						|
case "$1" in
 | 
						|
    purge|remove|abort-install|disappear)
 | 
						|
        process_state_file
 | 
						|
        process_udev
 | 
						|
    ;;
 | 
						|
 | 
						|
    upgrade|failed-upgrade|abort-upgrade|disappear)
 | 
						|
    ;;
 | 
						|
 | 
						|
    *)
 | 
						|
        echo "postrm called with unknown argument \`$1'" >&2
 | 
						|
        exit 1
 | 
						|
    ;;
 | 
						|
esac
 | 
						|
 | 
						|
 | 
						|
#DEBHELPER#
 | 
						|
 | 
						|
exit 0
 |