Le 20/02/2024 à 03:20, Max Nikulin a écrit :
On 20/02/2024 02:35, Erwan David wrote:
Le 19/02/2024 à 18:00, Max Nikulin a écrit :
systemctl disable --now apt-daily.timer apt-daily-upgrade.timer
Perhaps it is possible to write a script that will respect
connection.metered property set by NetworkManager.
I disable the timers, thanks
To avoid confusion, these timers are from the apt package, not from
unattended-upgrades. So they are active on most Debian hosts. Desktop
environments may display notifications after actions initiated by
these timers. Likely desktop environments may do more, e.g. to query
GNOME application shop for updates and initiate more frequent updates.
I'll have a look at connection.metered
Out of curiosity I have queried https://codesearch.debian.net. It
seems, apt has no notion of metered connection. Perhaps the effect can
be achieved by adding to unit configuration some Condition* mentioned
in systemd.directives(7)
https://stackoverflow.com/questions/43228973/detect-if-current-connection-is-metered-with-networkmanager
busctl get-property \
org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager \
org.freedesktop.NetworkManager Metered
It would also require to configure NetworkManager to set this correctly.
Eg When I use USB tethering. (same NetworkManager connexion may be used
at different places, without any way to simply detect this, when you do
not use Wifi)
--
Erwan David