From 78ede0e4631f76245a7a7c58e28501b7adc534b1 Mon Sep 17 00:00:00 2001 From: Zhi Yuan Carl Zhao Date: Fri, 23 Nov 2018 13:37:03 -0800 Subject: [PATCH] Fix networking.service waiting for udevadm settle 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. --- files/build_templates/sonic_debian_extension.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 7a0af5d82a2b..7bfbd73dd28c 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -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