aboutsummaryrefslogtreecommitdiffstats
path: root/testing/simplesnap/0003-use-CHECKHOST-in-checkbackups-function.patch
blob: b1bd214c437dabab2277299f85b8743047157c60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 79dd4680928fdc999527123ebd6b3363ca705e4a Mon Sep 17 00:00:00 2001
From: Henrik Riomar <henrik.riomar@gmail.com>
Date: Tue, 26 Jun 2018 07:57:58 +0200
Subject: [PATCH] use CHECKHOST in checkbackups() function

$CHECKHOST variable defined in checkbackups is unused, lets use it
instead of the global $HOST
---
 simplesnap | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/simplesnap b/simplesnap
index 63fc0c2..d9e1806 100755
--- a/simplesnap
+++ b/simplesnap
@@ -192,11 +192,11 @@ runzfs () {
 
 checkbackups () {
   CHECKHOST="$1"
-  DATASETS="`runzfs list -t filesystem,volume -o name -H -r \"${STORE}/${HOST}\"`"
+  DATASETS="`runzfs list -t filesystem,volume -o name -H -r \"${STORE}/${CHECKHOST}\"`"
   CUTOFF="`$DATE -d \"${CHECKMODE}\" +%s`"
   for CHECKDS in ${DATASETS}; do
     # Don't check the top-level host dataset itself.
-    if [ "${CHECKDS}" = "${STORE}/${HOST}" ]; then
+    if [ "${CHECKDS}" = "${STORE}/${CHECKHOST}" ]; then
         continue
     fi
 
-- 
2.17.1