On Mon, Jan 23, 2023 at 03:55:50PM +0100, Santiago Ruano Rincón wrote: > > That seems needlessly convoluted. What about this: > > > > [Service] > > Type=oneshot > > EnvironmentFile=-/etc/default/networking > > ExecStart=/sbin/ifup -a --read-environment > > ExecStart=-/sbin/ifup -a --read-environment --allow=hotplug > > ExecStop=/sbin/ifdown -a --read-environment --exclude=lo > > RemainAfterExit=true > > TimeoutStartSec=5min > > > > "start" and "restart" configure all existing "auto" and "allow-hotplug" > > interfaces. > > Missing "allow-hotplug" interfaces do not be marked as configured (so that > > they can be configured by udev) and do not make "start" or "restart" fail. > > 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 it, and it still results in a 10-second pause during startup while broadcasting dhcp over eth0. Which is not too surprising. You can't get around that if you run "ifup --allow=hotplug", and it's reasonable for systemd to wait for the process to finish, even if the exit code doesn't affect success. That may be an acceptable casualty for fixing the other problems, but I suspect it's something that many laptop users will encounter (they have wifi that is normally used and an ethernet port that is not; d-i sets only the wifi as "auto"). I didn't test it, but I believe Cyril's approach to avoid trying to bring up hotplug interfaces at all (unless during restart) would fix that. -Peff