[lxc-devel] [lxd-pkg-ubuntu/snappy-16] Update daemon.stop

battlemidget on Github lxc-bot at linuxcontainers.org
Fri Jun 30 01:25:46 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 384 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170630/12950773/attachment.bin>
-------------- next part --------------
From ff95d6ea5d74730c31ecdc75175605af4aa79d8c Mon Sep 17 00:00:00 2001
From: Adam Stokes <battlemidget at users.noreply.github.com>
Date: Thu, 29 Jun 2017 21:25:29 -0400
Subject: [PATCH] Update daemon.stop

Add another snap refresh conditional for when the snap gets auto-refreshed
---
 snapcraft/wrappers/daemon.stop | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/snapcraft/wrappers/daemon.stop b/snapcraft/wrappers/daemon.stop
index 8622572f..55a75df1 100755
--- a/snapcraft/wrappers/daemon.stop
+++ b/snapcraft/wrappers/daemon.stop
@@ -14,6 +14,8 @@ chroot /proc/1/root snap changes > "${STATUS}" || true
 reason="host shutdown"
 if ! lxc finger >/dev/null 2>&1; then
     reason="crashed"
+elif grep -q 'Auto-refresh snap "lxd"' "${STATUS}"; then
+    reason="snap refresh"
 elif grep -q 'Doing.*Refresh "lxd"' "${STATUS}"; then
     reason="snap refresh"
 elif grep -q 'Doing.*Install "lxd"' "${STATUS}"; then


More information about the lxc-devel mailing list