deployment: restart networking after grabbing /etc/network/interfaces via REST API

Now having verified that it works in toram mode when booting via NFS/PXE

From: Michael Prokop <mprokop@sipwise.com>
ksolomko/vlan
Michael Prokop 13 years ago
parent 899d3c7f65
commit 51b63b519d

@ -913,6 +913,15 @@ if "$RETRIEVE_MGMT_CONFIG" ; then
cp /etc/network/interfaces "${TARGET}/etc/network/interfaces"
# restart networking for the time being only when running either in toram mode
# or not booting from NFS, once we've finished the carrier setup procedure we
# should be able to make this as our only supported default mode and drop
# everything inside the 'else' statement...
if grep -q 'toram' /proc/cmdline || ! grep -q 'root=/dev/nfs' /proc/cmdline ; then
echo 'Restarting networking'
logit 'Restarting networking'
/etc/init.d/networking restart
else
# make sure we can access the management system which might be reachable
# through a specific VLAN only
ip link set dev "$INTERNAL_DEV" down # avoid conflicts with VLAN device(s)
@ -927,6 +936,7 @@ if "$RETRIEVE_MGMT_CONFIG" ; then
echo "Bringing up VLAN interface $interface"
ifup "$interface"
done
fi # toram
fi

Loading…
Cancel
Save