From 31cbb48a36060e59e5e05a718553334c74e20286 Mon Sep 17 00:00:00 2001 From: Alessandro Astone Date: Fri, 23 Jan 2026 14:29:57 +0100 Subject: debian: Trigger apt-daily on AC plug event Because the service has ConditionACPower=true, it would be nice to try and start it when plugging-in the AC power in case that an earlier timer trigger was missed due to not being plugged-in. It is not a problem that we may be invoking the service multiple times a day, because it keeps track of its own timestamp file to run up to once every "APT::Periodic::Update-Package-Lists" days Related: https://launchpad.net/bugs/2089151 --- debian/61-apt.rules | 1 + debian/apt.install | 1 + 2 files changed, 2 insertions(+) create mode 100644 debian/61-apt.rules (limited to 'debian') diff --git a/debian/61-apt.rules b/debian/61-apt.rules new file mode 100644 index 000000000..63e32162c --- /dev/null +++ b/debian/61-apt.rules @@ -0,0 +1 @@ +ACTION=="change", SUBSYSTEM=="power_supply", KERNEL=="AC", ATTR{online}=="1", TAG+="systemd", ENV{SYSTEMD_WANTS}+="apt-daily.service" diff --git a/debian/apt.install b/debian/apt.install index 40bcfcf10..1d0aaa8db 100644 --- a/debian/apt.install +++ b/debian/apt.install @@ -1,5 +1,6 @@ debian/*.service /usr/lib/systemd/system/ debian/*.timer /usr/lib/systemd/system/ +debian/61-apt.rules /usr/lib/udev/rules.d/ debian/apt.systemd.daily usr/lib/apt debian/default-sequoia.config usr/share/apt/ etc/apt/ -- cgit v1.2.3-70-g09d2