Package: kxd / 0.12-4

upstream_scripts-Fix-kxd-add-client-key-missing-fi-and-wrong-.patch Patch series | download
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
33
34
35
36
37
38
39
40
41
42
43
44
45
From 65d281acfc99d0c67bfc2e7d5c1582f79f9dcb3a Mon Sep 17 00:00:00 2001
From: Alberto Bertogli <albertito@blitiri.com.ar>
Date: Sun, 13 Jul 2014 14:31:23 +0100
Subject: [PATCH] scripts: Fix kxd-add-client-key missing "fi" and wrong
 variable

Somehow, scripts/kxd-add-client-key is missing a "fi" to close the "if"
statement, and uses $SERVER instead of $CLIENT in a couple of places.

This patch fixes that.

Thanks to Maximiliano Curia for reporting the issue.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
---
 scripts/kxd-add-client-key | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/scripts/kxd-add-client-key b/scripts/kxd-add-client-key
index eff0d56..dbeb958 100755
--- a/scripts/kxd-add-client-key
+++ b/scripts/kxd-add-client-key
@@ -5,7 +5,7 @@ set -e
 CLIENT="$1"
 KEYNAME="$2"
 
-if [ "$SERVER" = "" ] || [ "$KEYNAME" = "" ]; then
+if [ "$CLIENT" = "" ] || [ "$KEYNAME" = "" ]; then
 	echo "
 Usage: kxd-add-client-key <client hostname> <key name>
 
@@ -15,8 +15,9 @@ corresponding configuration (including a randomly generated key) in
 /etc/kxd/data/<client hostname>/<key name>/.
 "
 	exit 1
+fi
 
-CONFIGPATH="/etc/kxd/data/$SERVER/$KEYNAME"
+CONFIGPATH="/etc/kxd/data/$CLIENT/$KEYNAME"
 
 echo "Creating directory ($CONFIGPATH)"
 mkdir -p "$CONFIGPATH"
-- 
2.0.1