Subversion Repositories configs

Rev

Rev 9 | Rev 42 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9 Rev 34
Line 104... Line 104...
104
# we can't just delete the configured address because that address
104
# we can't just delete the configured address because that address
105
# may have been changed in the config file since the device was
105
# may have been changed in the config file since the device was
106
# brought up.  Flush all addresses associated with this
106
# brought up.  Flush all addresses associated with this
107
# instance instead.
107
# instance instead.
108
if [ -d "/sys/class/net/${REALDEVICE}" ]; then
108
if [ -d "/sys/class/net/${REALDEVICE}" ]; then
-
 
109
	if [ "${REALDEVICE}" = "lo" ]; then
-
 
110
		SCOPE="host"
-
 
111
	else
-
 
112
		SCOPE="global"
-
 
113
	fi
109
	if [ "${REALDEVICE}" = "${DEVICE}" ]; then
114
	if [ "${REALDEVICE}" = "${DEVICE}" ]; then
110
		ip addr flush dev ${REALDEVICE} scope global 2>/dev/null
115
		ip addr flush dev ${REALDEVICE} scope ${SCOPE} 2>/dev/null
111
	else
116
	else
112
		ip addr flush dev ${REALDEVICE} label ${DEVICE} scope global 2>/dev/null
117
		ip addr flush dev ${REALDEVICE} label ${DEVICE} scope ${SCOPE} 2>/dev/null
113
	fi
118
	fi
114
	
119
	
115
	if [ "${SLAVE}" = "yes" -a -n "${MASTER}" ]; then
120
	if [ "${SLAVE}" = "yes" -a -n "${MASTER}" ]; then
116
		echo "-${DEVICE}" > /sys/class/net/${MASTER}/bonding/slaves 2>/dev/null
121
		echo "-${DEVICE}" > /sys/class/net/${MASTER}/bonding/slaves 2>/dev/null
117
	fi
122
	fi