From 77c92a0bd1731b05ea877d0b0f6f57474423caf5 Mon Sep 17 00:00:00 2001 From: Boyang Yu Date: Mon, 30 Oct 2017 17:30:31 +0000 Subject: [PATCH 1/2] [Arista]: Fix the udev waiting in networking start This change is to fix the issue in https://github.com/aristanetworks/sonic/issues/16 For the checking condition used, it is only applied to Arista switches Signed-off-by: Boyang Yu --- files/build_templates/sonic_debian_extension.j2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 8270af923078..8aa089479f0f 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -188,6 +188,11 @@ 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 +if [ "$image_type" = "aboot" ]; then + sed -i 's/udevadm settle/udevadm settle -E \/sys\/class\/net\/eth0/' $FILESYSTEM_ROOT/etc/init.d/networking +fi + ## copy platform rc.local sudo cp $IMAGE_CONFIGS/platform/rc.local $FILESYSTEM_ROOT/etc/ From bd4fdb781dd337e7d903755e7619f9c97e7a8f6d Mon Sep 17 00:00:00 2001 From: Boyang Yu Date: Mon, 30 Oct 2017 21:34:59 +0000 Subject: [PATCH 2/2] [Arista]: Correct for PR comments Signed-off-by: Boyang Yu --- files/build_templates/sonic_debian_extension.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 8aa089479f0f..37fcfbc56fcb 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -190,7 +190,7 @@ sudo rm -f $FILESYSTEM_ROOT/usr/sbin/policy-rc.d ## Revise /etc/init.d/networking for Arista switches if [ "$image_type" = "aboot" ]; then - 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/etc/init.d/networking fi ## copy platform rc.local