Fix networking.service waiting for udevadm settle (#2295)

There was a fix to speed up initialization when networking used init.d
but it did not carry over to systemd networking.service. This fix will
apply the same change on the systemd service.

The result is much less time spent being blocked in networking.service.
This commit is contained in:
zzhiyuan 2018-11-23 17:06:23 -08:00 committed by Ying Xie
parent c899c0337f
commit f0540e7381

View File

@ -259,9 +259,10 @@ sudo dpkg --root=$FILESYSTEM_ROOT -P {{ debname }}
sudo rm -f $FILESYSTEM_ROOT/usr/sbin/policy-rc.d
## Revise /etc/init.d/networking for Arista switches
## Revise /etc/init.d/networking and /lib/systemd/system/networking.service for Arista switches
if [ "$image_type" = "aboot" ]; then
sudo sed -i 's/udevadm settle/udevadm settle -E \/sys\/class\/net\/eth0/' $FILESYSTEM_ROOT/etc/init.d/networking
sudo sed -i 's/udevadm settle/udevadm settle -E \/sys\/class\/net\/eth0/' $FILESYSTEM_ROOT/lib/systemd/system/networking.service
fi
## copy platform rc.local