dom0-updates: use qvm-service for disabling dom0 updates check
Use the same mechanism as VMs - first it's compatible with Admin API (in contrary to flag files); second it ease handling it. Migrate old setting on package upgrade.
This commit is contained in:
parent
10960564cf
commit
c03fbecb4e
@ -1,8 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
UPDATES_DISABLE_FLAG=/var/lib/qubes/updates/disable-updates
|
if [ "$(qvm-features dom0 service.qubes-update-check || echo 1)" != 1 ]; then
|
||||||
|
|
||||||
if [ -f "$UPDATES_DISABLE_FLAG" ]; then
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -165,6 +165,14 @@ fi
|
|||||||
|
|
||||||
systemctl enable qubes-suspend.service >/dev/null 2>&1
|
systemctl enable qubes-suspend.service >/dev/null 2>&1
|
||||||
|
|
||||||
|
# migrate dom0-updates check disable flag
|
||||||
|
if [ $1 -ge 2 ]; then
|
||||||
|
if [ -e /var/lib/qubes/updates/disable-updates ]; then
|
||||||
|
qvm-features dom0 service.qubes-update-check ''
|
||||||
|
rm -f /var/lib/qubes/updates/disable-updates
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ "$1" = 0 ] ; then
|
if [ "$1" = 0 ] ; then
|
||||||
# no more packages left
|
# no more packages left
|
||||||
|
Loading…
Reference in New Issue
Block a user