From 21d89335fe6243cced992e96f8cc9b1dab6e1055 Mon Sep 17 00:00:00 2001 From: Jason Mehring Date: Sat, 25 Apr 2015 03:44:28 -0400 Subject: [PATCH] debian: Update notification now notifies dom0 when an upgrade is completed --- Makefile | 1 + network/00notiy-hook | 2 ++ vm-systemd/qubes-update-check.service | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 network/00notiy-hook diff --git a/Makefile b/Makefile index d5bb589..1e7433c 100644 --- a/Makefile +++ b/Makefile @@ -192,6 +192,7 @@ install-deb: install -D -m 644 misc/qubes-archive-keyring.gpg $(DESTDIR)/etc/apt/trusted.gpg.d/qubes-archive-keyring.gpg install -D -m 644 network/iptables $(DESTDIR)/etc/iptables/rules.v4 install -D -m 644 network/ip6tables $(DESTDIR)/etc/iptables/rules.v6 + install -D -m 644 network/00notiy-hook $(DESTDIR)/etc/apt/apt.conf.d/00notiy-hook install -d $(DESTDIR)/etc/sysctl.d install -m 644 network/80-qubes.conf $(DESTDIR)/etc/sysctl.d/ install -D -m 644 misc/profile.d_qt_x11_no_mitshm.sh $(DESTDIR)/etc/profile.d/qt_x11_no_mitshm.sh diff --git a/network/00notiy-hook b/network/00notiy-hook new file mode 100644 index 0000000..a1764c5 --- /dev/null +++ b/network/00notiy-hook @@ -0,0 +1,2 @@ +#DPkg::Post-Invoke {"echo 'invoked' >> /tmp/apt-post-invoke; systemctl start qubes-update-check.service";}; +DPkg::Post-Invoke {"systemctl start qubes-update-check.service";}; diff --git a/vm-systemd/qubes-update-check.service b/vm-systemd/qubes-update-check.service index bca933b..5fcf636 100644 --- a/vm-systemd/qubes-update-check.service +++ b/vm-systemd/qubes-update-check.service @@ -4,4 +4,4 @@ ConditionPathExists=/var/run/qubes-service/qubes-update-check [Service] Type=oneshot -ExecStart=/usr/lib/qubes/qrexec-client-vm dom0 qubes.NotifyUpdates /bin/sh -c 'if [ -e /usr/bin/yum ]; then yum -q check-update >/dev/null; [ $? -eq 100 ] && echo 1 || echo 0; else apt-get -q update > /dev/null; apt-get -s upgrade | awk "/^Inst/{ print $2 }" | [ $(wc -L) -eq 0 ] && echo 0 || echo 1; fi' +ExecStart=/usr/lib/qubes/qrexec-client-vm dom0 qubes.NotifyUpdates /bin/sh -c 'if [ -e /etc/system-release ]; then yum -q check-update >/dev/null; [ $? -eq 100 ] && echo 1 || echo 0; else apt-get -q update > /dev/null; apt-get -s upgrade | awk "/^Inst/{ print $2 }" | [ $(wc -L) -eq 0 ] && echo 0 || echo 1; fi'