From ec7f491806a59ec36ca6e394e12cf4820991fe68 Mon Sep 17 00:00:00 2001 From: Tomas Plesnik <plesnik@ics.muni.cz> Date: Sun, 25 Mar 2012 21:56:14 +0200 Subject: [PATCH] uzavorkovani pouzitych promennych v retezcich --- src/warden-client/sh/uninstall.sh | 6 +++--- src/warden-client/sh/update.sh | 8 ++++---- src/warden-server/sh/uninstall.sh | 16 ++++++++-------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/warden-client/sh/uninstall.sh b/src/warden-client/sh/uninstall.sh index a76d464..64b0f84 100755 --- a/src/warden-client/sh/uninstall.sh +++ b/src/warden-client/sh/uninstall.sh @@ -31,7 +31,7 @@ # otherwise) arising in any way out of the use of this software, even # if advised of the possibility of such damage. -VERSION="1.0" +VERSION="1.1" #------------------------------------------------------------------------------- # FUNCTIONS @@ -88,7 +88,7 @@ os_chck() { OS=`uname` if [ "$OS" != "Linux" ]; then - echo "Sorry, unsupported operating system detected - \"$OS\"!" + echo "Sorry, unsupported operating system detected - \"${OS}\"!" exit 1 fi } @@ -117,7 +117,7 @@ params_chck() { if [ -z $prefix ]; then prefix=/opt - echo "Warning: parameter -d <directory> is not set - default uninstallation directory is $prefix!" + echo "Warning: parameter -d <directory> is not set - default uninstallation directory is ${prefix}!" fi } diff --git a/src/warden-client/sh/update.sh b/src/warden-client/sh/update.sh index cd994b2..d1d20ec 100755 --- a/src/warden-client/sh/update.sh +++ b/src/warden-client/sh/update.sh @@ -32,7 +32,7 @@ # if advised of the possibility of such damage. -VERSION="1.1" +VERSION="1.2" #------------------------------------------------------------------------------- # FUNCTIONS @@ -90,7 +90,7 @@ os_chck() { OS=`uname` if [ "$OS" != "Linux" ]; then - echo "Sorry, unsupported operating system detected - \"$OS\"!" + echo "Sorry, unsupported operating system detected - \"${OS}\"!" exit 1 fi } @@ -119,7 +119,7 @@ params_chck() { if [ -z $prefix ]; then prefix=/opt - echo "Warning: parameter -d <directory> is not set - default installation directory is $prefix!" + echo "Warning: parameter -d <directory> is not set - default installation directory is ${prefix}!" fi } @@ -353,7 +353,7 @@ make_conf_file change_permissions echo -echo "Please check configuration file in $conf_file!" +echo "Please check configuration file in ${conf_file}!" echo echo "Warden client directory: $client_path" echo diff --git a/src/warden-server/sh/uninstall.sh b/src/warden-server/sh/uninstall.sh index 090350f..6f220dd 100755 --- a/src/warden-server/sh/uninstall.sh +++ b/src/warden-server/sh/uninstall.sh @@ -31,7 +31,7 @@ # otherwise) arising in any way out of the use of this software, even # if advised of the possibility of such damage. -VERSION="0.1" +VERSION="0.2" #------------------------------------------------------------------------------- # FUNCTIONS @@ -74,8 +74,8 @@ err_clean() { echo "FAILED!" echo " -> Reverting changes of warden server package ... OK" - rm -rf $server_path/* > /dev/null 2>&1 # delete new version - cp -R $backup_dir/* $server_path # copy old backuped server + rm -rf ${server_path}/* > /dev/null 2>&1 # delete new version + cp -R ${backup_dir}/* $server_path # copy old backuped server chmod 600 $db_file # change permission to DB file for file in `ls -1 $bin | grep -v warden-alive | grep -v create_tables.sh | grep -v wardend` do @@ -95,7 +95,7 @@ os_chck() { OS=`uname` if [ "$OS" != "Linux" ]; then - echo "Sorry, unsupported operating system detected - \"$OS\"!" + echo "Sorry, unsupported operating system detected - \"${OS}\"!" exit 1 fi } @@ -124,7 +124,7 @@ params_chck() { if [ -z $prefix ]; then prefix=/opt - echo "Warning: parameter -d <directory> is not set - default uninstallation directory is $prefix!" + echo "Warning: parameter -d <directory> is not set - default uninstallation directory is ${prefix}!" fi } @@ -155,7 +155,7 @@ warden_dir_chck() stop_warden_server() { echo "Stopping warden server ... " - $init force-stop 1>/dev/null 2>&1 + ${init} force-stop 1>/dev/null 2>&1 } @@ -176,10 +176,10 @@ delete_symlinks() echo -n "Deleting symlinks from /usr/local/bin ..." for file in `ls -1 $bin | grep -v warden-alive | grep -v wardend | grep -v create_tables.sh` do - rm -rf /usr/local/bin/$file 2> /dev/null + rm -rf ${local_bin}/$file 2> /dev/null done echo "OK" - echo -n "Deleting symlink from $init ..." + echo -n "Deleting symlink from ${init} ..." rm -rf $init 2> /dev/null echo "OK" } -- GitLab