From 8d7811827f96b7dc9ab448c5c0019da6257a6a8f Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Mon, 14 May 2012 04:56:30 +0200 Subject: [PATCH] dom0/qubes-updates: stat file for qubes-manager --- dom0/aux-tools/qubes-dom0-updates.cron | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dom0/aux-tools/qubes-dom0-updates.cron b/dom0/aux-tools/qubes-dom0-updates.cron index 4feb65f3..b30a0b43 100755 --- a/dom0/aux-tools/qubes-dom0-updates.cron +++ b/dom0/aux-tools/qubes-dom0-updates.cron @@ -4,6 +4,7 @@ LOCAL_USER=`users | sed -e 's/root *//' | cut -d' ' -f 1` PIDFILE=/var/run/qubes/dom0-update-notification.pid NOTIFY_ICON=/usr/share/qubes/icons/dom0-update-avail.svg +UPDATES_STAT_FILE=/var/lib/qubes/updates/dom0-updates-available # Do not allow multiple instances [ -r $PIDFILE ] && kill -0 `cat $PIDFILE` && exit 0 @@ -26,6 +27,9 @@ if [ -z "$LOCAL_USER" ]; then exit 1 fi +# Touch stat file for qubes-manager +touch $UPDATES_STAT_FILE + # Notify about updates using system tray zenity --notification --window-icon=$NOTIFY_ICON --text="Qubes dom0 updates available." @@ -33,3 +37,6 @@ zenity --question --title="Qubes Dom0 updates" \ --text="There are updates for dom0 available, do you want to download them now?" || exit 0 su -c "DISPLAY=:0 qubes-dom0-update --gui" $LOCAL_USER + +# Check if user installed updates +yum -q check-updates && rm $UPDATES_STAT_FILE