summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRunar Borge <runar@borge.nu>2020-01-19 20:47:46 +0100
committerRunar Borge <runar@borge.nu>2020-01-19 20:47:46 +0100
commitf941a5387076bebe913397f6b24e9359a679c872 (patch)
treed977f9ae9541fd236bec363990385475600c8593 /scripts
parentf6ca8d0fa502b3b23d8adf30749030d5bce16b85 (diff)
downloadvyatta-cfg-f941a5387076bebe913397f6b24e9359a679c872.tar.gz
vyatta-cfg-f941a5387076bebe913397f6b24e9359a679c872.zip
T1970: init: delay initialization of vyos-router to udev is setteled
On devices with many nic's udev initialization and nic renaming could take a lot of time, this commit delays vyos-router startup until udev is completed, and thouse all nic renaming processes are completed prior to starting vyos-router
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/init/vyos-router9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/init/vyos-router b/scripts/init/vyos-router
index 8949f53..63769ba 100755
--- a/scripts/init/vyos-router
+++ b/scripts/init/vyos-router
@@ -173,6 +173,15 @@ bind_mount_boot ()
start ()
{
+ log_daemon_msg "Waiting for NIC's to settle down"
+ # On boot time udev migth take a long time to reorder nic's, this will ensure that
+ # all udev activity is completed and all nics presented at boot-time will have their
+ # final name before continuing with vyos-router initialization.
+ SECONDS=0
+ udevadm settle
+ STATUS=$?
+ log_progress_msg "setteled in ${SECONDS}sec."
+ log_end_msg ${STATUS}
# Fixup for FRR
# In 5.1 master, zebra thinks existence of /var/run/netns is