Skip to content
Snippets Groups Projects
Commit 7c1401a9 authored by Tomáš Plesník's avatar Tomáš Plesník
Browse files

zmena adresare package_version.txt

parent 95a3f1ee
No related branches found
No related tags found
No related merge requests found
...@@ -143,8 +143,9 @@ params_chck() ...@@ -143,8 +143,9 @@ params_chck()
old_client_chck() old_client_chck()
{ {
old_package_version_file="$etc/package_version.txt" old_package_version_file="$client_path/package_version.txt"
if [ -f $old_package_version_file ]; then if [ -f $old_package_version_file ]; then
old_package_version=`cat $old_package_version_file`
echo "Sorry, but $old_package_version package is installed!" echo "Sorry, but $old_package_version package is installed!"
echo "For update of warden client package please use update.sh script." echo "For update of warden client package please use update.sh script."
exit 1 exit 1
...@@ -197,6 +198,7 @@ make_warden_dir() ...@@ -197,6 +198,7 @@ make_warden_dir()
cp -u $dirname/$file "$client_path/doc" cp -u $dirname/$file "$client_path/doc"
done done
cp -u $dirname/uninstall.sh "$client_path" cp -u $dirname/uninstall.sh "$client_path"
cp -u $dirname/package_version.txt "$client_path"
} }
...@@ -308,7 +310,7 @@ params_chck ...@@ -308,7 +310,7 @@ params_chck
# create variables # create variables
dirname=`dirname $0` dirname=`dirname $0`
package_version=`cat $dirname/warden-client/etc/package_version.txt` package_version=`cat $dirname/warden-client/package_version.txt`
key_file=`basename $key` key_file=`basename $key`
cert_file=`basename $cert` cert_file=`basename $cert`
[[ $prefix == */ ]] && prefix="${prefix%?}" # remove last char (slash) from prefix [[ $prefix == */ ]] && prefix="${prefix%?}" # remove last char (slash) from prefix
......
...@@ -199,7 +199,7 @@ params_chck ...@@ -199,7 +199,7 @@ params_chck
[[ $prefix == */ ]] && prefix="${prefix%?}" # remove last char (slash) from prefix [[ $prefix == */ ]] && prefix="${prefix%?}" # remove last char (slash) from prefix
client_path="$prefix/warden-client" client_path="$prefix/warden-client"
etc="$client_path/etc" etc="$client_path/etc"
old_package_version_file="$etc/package_version.txt" old_package_version_file="$client_path/package_version.txt"
err="/tmp/warden-err" err="/tmp/warden-err"
backup_dir="/tmp/warden-backup" backup_dir="/tmp/warden-backup"
......
...@@ -207,7 +207,6 @@ update_warden_dir() ...@@ -207,7 +207,6 @@ update_warden_dir()
{ {
echo -n "Updating warden client directory ... " echo -n "Updating warden client directory ... "
rsync -q --recursive --archive --delete --exclude="$dirname/warden-client/etc"\ rsync -q --recursive --archive --delete --exclude="$dirname/warden-client/etc"\
--include="$dirname/warden-client/etc/package_version.txt"\
--exclude="$dirname/warden-client/var"\ --exclude="$dirname/warden-client/var"\
warden-client $prefix 2> $err; ret_val=`echo $?` warden-client $prefix 2> $err; ret_val=`echo $?`
if [ $ret_val -eq 0 ]; then if [ $ret_val -eq 0 ]; then
...@@ -309,11 +308,11 @@ params_chck ...@@ -309,11 +308,11 @@ params_chck
# create variables # create variables
dirname=`dirname $0` dirname=`dirname $0`
package_version=`cat $dirname/warden-client/etc/package_version.txt` package_version=`cat $dirname/warden-client/package_version.txt`
[[ $prefix == */ ]] && prefix="${prefix%?}" # remove last char (slash) from prefix [[ $prefix == */ ]] && prefix="${prefix%?}" # remove last char (slash) from prefix
client_path="$prefix/warden-client" client_path="$prefix/warden-client"
etc="$client_path/etc" etc="$client_path/etc"
old_package_version_file="$etc/package_version.txt" old_package_version_file="$client_path/package_version.txt"
conf_file="$etc/warden-client.conf" conf_file="$etc/warden-client.conf"
err="/tmp/warden-err" err="/tmp/warden-err"
backup_dir="/tmp/warden-backup" backup_dir="/tmp/warden-backup"
...@@ -334,9 +333,6 @@ modules_chck ...@@ -334,9 +333,6 @@ modules_chck
echo echo
echo "------------------------- Update process --------------------------------" echo "------------------------- Update process --------------------------------"
# check installation directory
installation_dir_chck
# check warden client directory # check warden client directory
warden_dir_chck warden_dir_chck
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment