Corrected loopback device - will now set IP

This commit is contained in:
2017-11-18 08:48:35 -06:00
parent 68281843d3
commit 9730a62265

View File

@@ -1,6 +1,6 @@
#!/bin/sh
VERSION=1.0
VERSION=1.1
CONFDIR=/etc
CONFIGFILE=$CONFDIR/network.conf
NL='
@@ -237,6 +237,21 @@ up () {
for brport in "$brports"; do
[ -n "$verbose" ] && echo "Configuring $brport as slave to $iface"
[ -n "$verbose" ] && echo "Flushing interface $brport"
if [ -n "$noact" ]; then
echo "ip address flush dev $brport"
else
ip address flush dev $brport
fi
[ -n "$verbose" ] && echo "Bringing up interface $brport"
if [ -n "$noact" ]; then
echo "ip link set dev $brport up"
else
ip link set dev $brport up
fi
if [ -n "$noact" ]; then
echo "ip link set dev $brport master $iface"
@@ -291,8 +306,10 @@ up () {
if [ -n "$noact" ]; then
echo "ip link set dev $iface up"
echo "ip addr add 127.0.0.1/8 dev $iface"
else
ip link set dev $iface up
ip addr add 127.0.0.1/8 dev $iface
fi
elif [ -n "$static" ]; then
case "$iface" in