From 0c40a1a2f42c86841800518e52c1794d4b19aa3a Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 10 Feb 2020 16:29:20 +0000 Subject: Add bcnm again, use bcnm-waitif --- layout/rootfs/etc/s6-rc/source-base/init-eth0/down | 1 + layout/rootfs/etc/s6-rc/source-base/init-eth0/up | 2 +- layout/rootfs/etc/s6-rc/source-base/init-lo/dependencies | 1 + layout/rootfs/etc/s6-rc/source-base/init-lo/down | 1 + layout/rootfs/etc/s6-rc/source-base/init-lo/up | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) (limited to 'layout/rootfs/etc') diff --git a/layout/rootfs/etc/s6-rc/source-base/init-eth0/down b/layout/rootfs/etc/s6-rc/source-base/init-eth0/down index 5404b98..6733be4 100644 --- a/layout/rootfs/etc/s6-rc/source-base/init-eth0/down +++ b/layout/rootfs/etc/s6-rc/source-base/init-eth0/down @@ -1,2 +1,3 @@ foreground { ip link set dev eth0 down } +foreground { bcnm-waitif -d 2 eth0 } exit 0 diff --git a/layout/rootfs/etc/s6-rc/source-base/init-eth0/up b/layout/rootfs/etc/s6-rc/source-base/init-eth0/up index 871558f..987a4af 100644 --- a/layout/rootfs/etc/s6-rc/source-base/init-eth0/up +++ b/layout/rootfs/etc/s6-rc/source-base/init-eth0/up @@ -1,3 +1,3 @@ -if { sleep 3 } # delay to load virtio-net +if { bcnm-waitif 1 eth0 } if { ip addr add 10.0.2.1/24 dev eth0 } ip link set dev eth0 up diff --git a/layout/rootfs/etc/s6-rc/source-base/init-lo/dependencies b/layout/rootfs/etc/s6-rc/source-base/init-lo/dependencies index f4c707c..97749cc 100644 --- a/layout/rootfs/etc/s6-rc/source-base/init-lo/dependencies +++ b/layout/rootfs/etc/s6-rc/source-base/init-lo/dependencies @@ -1 +1,2 @@ init-sysctl +init-coldplug diff --git a/layout/rootfs/etc/s6-rc/source-base/init-lo/down b/layout/rootfs/etc/s6-rc/source-base/init-lo/down index 06de595..5a85d32 100644 --- a/layout/rootfs/etc/s6-rc/source-base/init-lo/down +++ b/layout/rootfs/etc/s6-rc/source-base/init-lo/down @@ -1,2 +1,3 @@ foreground { ip link set dev lo down } +foreground { bcnm-waitif -d 2 lo } exit 0 diff --git a/layout/rootfs/etc/s6-rc/source-base/init-lo/up b/layout/rootfs/etc/s6-rc/source-base/init-lo/up index 1a1beea..aa19a67 100644 --- a/layout/rootfs/etc/s6-rc/source-base/init-lo/up +++ b/layout/rootfs/etc/s6-rc/source-base/init-lo/up @@ -1,2 +1,3 @@ +if { bcnm-waitif 1 lo } if { ip addr add 127.0.0.1/8 dev lo } ip link set dev lo up -- cgit v1.2.3