On Mon Jan 23, 2023 at 2:55 PM UTC, Santiago Ruano Rincón wrote:
> Thanks everybody for the inputs. I've applied Paul's solution, and the
> generated .deb can be downloaded from here:
>
> https://salsa.debian.org/debian/ifupdown/-/jobs/3841392/artifacts/raw/debian/output/ifupdown_0.8.41~1.gbp3a6fae+salsaci+20230123+42_amd64.deb
>
> Would it be possible for you (Oleg, Paul, Jeff, kibi et al.) to give it
> a try?
I tried this *.deb (Pascal approach). It doesn't change behaviour
introduced after this patch [1]. Yes, restart for "allow-hotplug"
interfaces work but I got the same system boot lag in Jeff configuration.
Cyril's latest solution seems to work. I just added "-" to /bin/sh to
deal with cases when we have a device that is really hotplug and absent:
[Service]
Type=oneshot
EnvironmentFile=-/etc/default/networking
ExecStart=/sbin/ifup -a --read-environment
ExecStart=-/bin/sh -c 'if [ -f /run/network/restart-hotplug ]; then
/sbin/ifup -a --read-environment --allow=hotplug; fi'
ExecStop=/sbin/ifdown -a --read-environment --exclude=lo
ExecStopPost=/usr/bin/touch /run/network/restart-hotplug
RemainAfterExit=true
TimeoutStartSec=5min
I got fast boot (as without bad patch) and working restart. One minute
long blocking during `systemctl restart networking` when DHCP is not
respoding (as in Jeff config) is expected.
Thanks to all!
[1] https://salsa.debian.org/debian/ifupdown/-/merge_requests/17
>
> Cheers,
>
> -- S