From 28735ec5b067325b5c5e1e82bde759a6e40fc307 Mon Sep 17 00:00:00 2001
From: Tomas Plesnik <plesnik@ics.muni.cz>
Date: Thu, 29 Mar 2012 11:17:04 +0200
Subject: [PATCH] oprava chybneho nastaveni prav k etc a oprava chybneho
 kopirovani obsahu adresare warden-client pri backup

---
 src/warden-client/sh/update.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/warden-client/sh/update.sh b/src/warden-client/sh/update.sh
index d1d20ec..9205d9b 100755
--- a/src/warden-client/sh/update.sh
+++ b/src/warden-client/sh/update.sh
@@ -184,7 +184,7 @@ backup()
 {
 	echo -n "Backing-up warden client directory ... "
 	mkdir $backup_dir
-	if cp -R $client_path $backup_dir 2> $err; then
+	if cp -R ${client_path}/* $backup_dir 2> $err; then
 		echo "OK"
 	else
 		err
@@ -266,9 +266,9 @@ change_permissions()
 {
 	echo -n "Changing permissions to updated package ... "
 	chown -R $user: $client_path 2>$err || err_clean
-	key_file=`echo $ssl_key_file` | cut -d "\"" -f 2 | cut -d "\"" -f 1
-	cert_file=`echo $ssl_cert_file` | cut -d "\"" -f 2 | cut -d "\"" -f 1
-       	chmod 400 ${etc}/$key_file ${etc}/$cert_file || err_clean
+	key_file=`echo $ssl_key_file | cut -d "\"" -f 2`
+	cert_file=`echo $ssl_cert_file | cut -d "\"" -f 2`
+       	chmod 400 $key_file $cert_file || err_clean 
        	chmod 644 $old_package_version_file || err_clean
 	if chmod 600 $conf_file; then
 		echo "OK"
-- 
GitLab