Skip to content

Commit 4902c26

Browse files
vivekrnvjudyjoseph
authored andcommitted
[interfaces-config] "main exception: cannot find interfaces: eth0" error log avoided (#10463)
- Why I did it Fixes #9628 During bootup, this error log is seen Dec 22 04:26:29 sonic interfaces-config.sh[2546]: error: main exception: cannot find interfaces: eth0 (interface was probably never up ?) This is of non-functional nature and doesn't affect the flow. - How I did it Dont take the ifdown if not needed - How to verify it Verified during reboot. Log did not appear and IP was acquired on eth0 as expected Signed-off-by: Vivek Reddy Karri <[email protected]>
1 parent 7c20568 commit 4902c26

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

files/image_config/interfaces/interfaces-config.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22

3-
ifdown --force eth0
3+
if [[ $(ifquery --running eth0) ]]; then
4+
ifdown --force eth0
5+
fi
46

57
# Check if ZTP DHCP policy has been installed
68
if [ -e /etc/network/ifupdown2/policy.d/ztp_dhcp.json ]; then

0 commit comments

Comments
 (0)