summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren 'Tadgy' Austin <darren@afterdark.org.uk>2018-10-18 15:43:24 +0100
committerRobby Workman <rworkman@slackware.com>2018-11-26 02:04:37 -0600
commit109548453273782d8c33b1643c900f07f6898c5d (patch)
treed4130c53de60fd27be790c18999cf2fe401541c1
parent65f284e1f0a1f6aee4374cd8aa64e9a15b1a9390 (diff)
downloadslacknetsetup-109548453273782d8c33b1643c900f07f6898c5d.tar.xz
Flush ip addresses on lo when taking interfaces down
This prevents an annoying "RTNETLINK answers: File exists" warning when restarting networking Signed-off-by: Robby Workman <rworkman@slackware.com>
-rw-r--r--rc.inet12
1 files changed, 2 insertions, 0 deletions
diff --git a/rc.inet1 b/rc.inet1
index 6f3df52..a16c047 100644
--- a/rc.inet1
+++ b/rc.inet1
@@ -91,6 +91,8 @@ lo_up() {
# Function to take down the loopback interface:
lo_down() {
if [ -e /sys/class/net/lo ]; then
+ echo "/etc/rc.d/rc.inet1: /sbin/ip address flush dev lo" | $LOGGER
+ /sbin/ip address flush dev lo
echo "/etc/rc.d/rc.inet1: /sbin/ip link set dev lo down" | $LOGGER
/sbin/ip link set dev lo down
fi