Bug#1118372: apt-daily-upgrade fails when eth0 is not present

Frederik Reiß <[email protected]>
Newsgroups gmane.linux.debian.apt.devel
Message-ID <aa41298d-72bc-4808-b604-a46ebd1f2d67__16995.0387951516$1760813008$gmane$org@posteo.de>
Package: apt
Version: 3.0.3


I'm running Debian 13.1 Trixie in multiple containers. Last week I 
renamed the network devices in the Containers from eth0 to eth60. Since 
then can see the following lines in the "/var/log/syslog" of the containers:

2025-10-18T19:36:43+02:00 mojo-proxy systemd[1]: Starting 
apt-daily-upgrade.service - Daily apt upgrade and clean activities...
2025-10-18T19:37:13+02:00 mojo-proxy systemd-networkd-wait-online[295 
Timeout occurred while waiting for network connectivity.
2025-10-18T19:37:13+02:00 mojo-proxy apt-helper[293]: E: Sub-process 
/lib/systemd/systemd-networkd-wait-online returned an error code (1)
2025-10-18T19:37:14+02:00 mojo-proxy systemd[1]: 
apt-daily-upgrade.service: Deactivated successfully.
2025-10-18T19:37:14+02:00 mojo-proxy systemd[1]: Finished 
apt-daily-upgrade.service - Daily apt upgrade and clean activities.

This Timeout comes from the "apt" package: The 
"apt-daily-upgrade.service" calls "ExecStartPre=-/usr/lib/apt/apt-helper 
wait-online" which in turn calls 
"/usr/lib/systemd/systemd-networkd-wait-online". Which Times out.

The manual[1] of systemds "systemd-networkd-wait-online" clearly states 
that by default it only checks eth0. But it also has the parameter 
"--interface=" to handle the case when there is no eth0. I successfully 
used this Parameter in the "systemd-networkd-wait-online.service" which 
had the same problem as the "apt-daily-upgrade.service". Sadly this fix 
does not work in the "apt-daily-upgrade.service" case because it does 
not call "/usr/bin/systemd/systemd-networkd-wait-online" directly. And 
"apt-helper" has no factility in place to hand over the "--interface=" 
parameter to "systemd-networkd-wait-online".

[1] 
https://manpages.debian.org/trixie/systemd/systemd-networkd-wait-online.8.en.html

Best Regards

Fred
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.