diff --git a/src/warden-client/sh/update.sh b/src/warden-client/sh/update.sh index 0c22689ce09c902748783fff0c8eee62a223cbe4..c18318f211721003496858d7a8f95e3307b34dbb 100755 --- a/src/warden-client/sh/update.sh +++ b/src/warden-client/sh/update.sh @@ -128,6 +128,10 @@ obtain_package_version() { if [ -f $old_package_version_file ]; then old_package_version=`cat $old_package_version_file` + if [ "$old_package_version" == "$package_version" ]; then + echo "Sorry, but $package_version package is already installed!" + exit 1 + fi else echo "Sorry, but warden-client package is not installed!" echo "For installation of warden client package please use install.sh script." @@ -206,9 +210,9 @@ obtain_warden_user() update_warden_dir() { echo -n "Updating warden client directory ... " - rsync -q --recursive --archive --delete --exclude="$dirname/warden-client/etc"\ - --exclude="$dirname/warden-client/var"\ - warden-client $prefix 2> $err; ret_val=`echo $?` + rsync -q --recursive --archive --delete --exclude="$dirname/warden-client/etc"\ + --exclude="$dirname/warden-client/var"\ + warden-client $client_path 2> $err; ret_val=`echo $?` if [ $ret_val -eq 0 ]; then echo "OK" else @@ -221,6 +225,7 @@ update_warden_dir() cp -u "$dirname/$file" "$client_path/doc" done cp -u "$dirname/uninstall.sh" "$client_path" + cp -u "$dirname/package_version.txt" "$client_path" } @@ -282,7 +287,7 @@ change_permissions() #------------------------------------------------------------------------------- # list of used Perl modules -modules=(SOAP::Lite IO::Socket::SSL SOAP::Transport::TCP FindBin) +modules=(SOAP::Lite IO::Socket::SSL SOAP::Transport::TCP FindBin DateTime) # OS test os_chck