dom0-updates: use qvm-features to report dom0 updates

Use the same as thing as VMs.
This commit is contained in:
Marek Marczykowski-Górecki 2018-11-02 01:58:27 +01:00
parent 0a94e59325
commit 10960564cf
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 3 additions and 8 deletions

View File

@ -227,9 +227,9 @@ elif [ -f /var/lib/qubes/updates/repodata/repomd.xml ]; then
dnf $YUM_OPTS $YUM_ACTION
fi
fi
dnf -q check-update && rm -f $UPDATES_STAT_FILE
dnf -q check-update && qvm-features dom0 updates-available ''
else
rm -f $UPDATES_STAT_FILE
qvm-features dom0 updates-available ''
echo "No updates available" >&2
if [ "$GUI" == "1" ]; then
zenity --info --title='Dom0 updates' --text='No updates available'

View File

@ -1,7 +1,5 @@
#!/bin/bash
NOTIFY_ICON=/usr/share/qubes/icons/dom0-update-avail.svg
UPDATES_STAT_FILE=/var/lib/qubes/updates/dom0-updates-available
UPDATES_DISABLE_FLAG=/var/lib/qubes/updates/disable-updates
if [ -f "$UPDATES_DISABLE_FLAG" ]; then
@ -17,7 +15,4 @@ if [ "$RETCODE" -ne 100 ]; then
exit $RETCODE
fi
# Touch stat file for qubes-manager
touch "$UPDATES_STAT_FILE"
chgrp qubes "$UPDATES_STAT_FILE"
chmod g+w "$UPDATES_STAT_FILE"
qvm-features dom0 updates-available 1