Skip to content

Commit

Permalink
Fix networking.service waiting for udevadm settle (#2295)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zzhiyuan authored and yxieca committed Nov 24, 2018
1 parent c899c03 commit f0540e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f0540e7

Please sign in to comment.