From 10960564cf3508bb0e74f2344f89fa93fec47f4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 2 Nov 2018 01:58:27 +0100 Subject: [PATCH] dom0-updates: use qvm-features to report dom0 updates Use the same as thing as VMs. --- dom0-updates/qubes-dom0-update | 4 ++-- dom0-updates/qubes-dom0-updates.cron | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/dom0-updates/qubes-dom0-update b/dom0-updates/qubes-dom0-update index b464dd9..787b8e4 100755 --- a/dom0-updates/qubes-dom0-update +++ b/dom0-updates/qubes-dom0-update @@ -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' diff --git a/dom0-updates/qubes-dom0-updates.cron b/dom0-updates/qubes-dom0-updates.cron index c6104da..4871e35 100755 --- a/dom0-updates/qubes-dom0-updates.cron +++ b/dom0-updates/qubes-dom0-updates.cron @@ -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