diff --git a/src/warden-client/doc/example-sender.pl.txt b/src/warden-client/doc/example-sender.pl.txt old mode 100644 new mode 100755 diff --git a/src/warden-client/etc/package_version b/src/warden-client/etc/package_version index 0838c147d4a1a9e83932604f055f8581a406c63d..b0e13726b780dad53fd80e1534c75ee691e0d022 100644 --- a/src/warden-client/etc/package_version +++ b/src/warden-client/etc/package_version @@ -1 +1 @@ -warden-client-2.0 +warden-client-2.1 diff --git a/src/warden-client/lib/WardenClientCommon.pm b/src/warden-client/lib/WardenClientCommon.pm old mode 100644 new mode 100755 diff --git a/src/warden-client/sh/install.sh b/src/warden-client/sh/install.sh index 5d996ed174e494193be1447410a83e961dbdcc94..78226b702cd661697868ce3c6b01ca38daaa82e4 100755 --- a/src/warden-client/sh/install.sh +++ b/src/warden-client/sh/install.sh @@ -140,18 +140,25 @@ make_warden_dir() { echo -n "Creating warden client directory ... " test -d $prefix || mkdir -p prefix - if cp -R ${dirname}/warden-client $prefix 2> $err; then + + if cp -R ${dirname}/warden-client $prefix 2> $err; then echo "OK" else err_clean fi + echo -n "Copying files ... " + files=(CHANGELOG INSTALL LICENSE README README.cesnet) for file in ${files[@]}; do cp ${dirname}/warden-client/doc/$file ${client_path}/doc done + + test -d ${client_path}/sh || mkdir -p ${client_path}/sh cp ${dirname}/uninstall.sh ${client_path}/sh + + echo "OK" } @@ -203,6 +210,33 @@ make_conf_file() # SSL_CA_FILE - path to CA certificate file #------------------------------------------------------------------------------- \$SSL_CA_FILE = \"${ca_file}\"; + +#------------------------------------------------------------------------------- +# MAX_RCV_EVENTS_LIMIT - maximum number of events the client is allowd to get +# from the Warden server in one batch +#------------------------------------------------------------------------------- +\$MAX_RCV_EVENTS_LIMIT = 6000; #consumes app. 250 MB of memory + +#------------------------------------------------------------------------------- +# Log options +# +# LOG_STDERR, LOG_SYSLOG - hide (0) or allow (1) error reporting on STDERR +# and/or to Syslog +# LOG_STDERR_VERBOSE, LOG_SYSLOG_VERBOSE - print only error message without +# a stack (0) or print debug info +# including err. message and stack (1) +#------------------------------------------------------------------------------- +\$LOG_STDERR = 1; + +\$LOG_SYSLOG = 0; +\$LOG_SYSLOG_FACILITY = \"local7\"; + +\$LOG_VERBOSE = 0; + + + +1; + " > $conf_file 2> $err; ret_val=`echo $?` if [ $ret_val -eq 0 ]; then diff --git a/src/warden-client/sh/uninstall.sh b/src/warden-client/sh/uninstall.sh index c2b52d0c2acd5a1d6fa0f7c152935347f202270f..96e63413bec166489f1dc3d9e88714c1bd4ed8d9 100755 --- a/src/warden-client/sh/uninstall.sh +++ b/src/warden-client/sh/uninstall.sh @@ -6,7 +6,7 @@ # # Use of this source is governed by a BSD-style license, see LICENSE file. -VERSION="2.0" +VERSION="2.1" #------------------------------------------------------------------------------- # FUNCTIONS @@ -126,12 +126,6 @@ uninstall_warden_client() # MAIN #------------------------------------------------------------------------------- -# OS test -os_chck - -# Shell test -shell_chck - # read input while getopts "d:Vh" options; do case $options in @@ -156,6 +150,9 @@ obtain_package_version echo echo "------------------------- Uninstallation process --------------------------------" +# root check +root_chck + # check if $prefix/warden-client directory exist warden_dir_chck diff --git a/src/warden-client/sh/update.sh b/src/warden-client/sh/update.sh index 62564995e430f832b9c16f00444134a246b4f1dd..a08085c6bceafd9bc7ee50a0fa4c7365db7a4f16 100755 --- a/src/warden-client/sh/update.sh +++ b/src/warden-client/sh/update.sh @@ -7,7 +7,7 @@ # Use of this source is governed by a BSD-style license, see LICENSE file. -VERSION="2.0" +VERSION="2.1" #------------------------------------------------------------------------------- # FUNCTIONS @@ -184,6 +184,28 @@ make_conf_file() ssl_key_file=`cat $conf_file | grep '$SSL_KEY_FILE'` ssl_cert_file=`cat $conf_file | grep '$SSL_CERT_FILE'` ssl_ca_file=`cat $conf_file | grep '$SSL_CA_FILE'` + max_rcv_events_limit=`cat $conf_file | grep '$MAX_RCV_EVENTS_LIMIT'` + + log_stderr=`cat $conf_file | grep '$LOG_STDERR'` + if [ -z $log_stderr ]; then + log_stderr="\$LOG_STDERR = 1;" + fi + + log_syslog=`cat $conf_file | grep '$LOG_SYSLOG'` + if [ -z $log_syslog ]; then + log_syslog="\$LOG_SYSLOG = 0;" + fi + + log_syslog_facility=`cat $conf_file | grep '$LOG_SYSLOG_FACILITY'` + if [ -z $log_syslog_facility ]; then + log_syslog_facility="\$LOG_SYSLOG_FACILITY = \"local7\";" + fi + + log_verbose=`cat $conf_file | grep '$LOG_VERBOSE'` + if [ -z $log_verbose ]; then + log_verbose="\$LOG_VERBOSE = 0;" + fi + echo "# # warden-client.conf - configuration file for the warden sender/receiver client # @@ -207,6 +229,30 @@ $ssl_cert_file # SSL_CA_FILE - path to CA certificate file #------------------------------------------------------------------------------- $ssl_ca_file + +#------------------------------------------------------------------------------- +# MAX_RCV_EVENTS_LIMIT - maximum number of events the client is allowd to get +# from the Warden server in one batch +#------------------------------------------------------------------------------- +$max_rcv_events_limit + +#------------------------------------------------------------------------------- +# Log options +# +# LOG_STDERR, LOG_SYSLOG - hide (0) or allow (1) error reporting on STDERR +# and/or to Syslog +# LOG_STDERR_VERBOSE, LOG_SYSLOG_VERBOSE - print only error message without +# a stack (0) or print debug info +# including err. message and stack (1) +#------------------------------------------------------------------------------- +$log_stderr + +$log_syslog +$log_syslog_facility + +$log_verbose + +1; " > $conf_file 2> $err; ret_val=`echo $?` if [ $ret_val -eq 0 ]; then @@ -221,9 +267,6 @@ 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` - 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" @@ -239,7 +282,7 @@ change_permissions() #------------------------------------------------------------------------------- # list of used Perl modules -modules=(SOAP::Lite IO::Socket::SSL SOAP::Transport::HTTP FindBin DateTime) +modules=(SOAP::Lite IO::Socket::SSL SOAP::Transport::HTTP FindBin DateTime Carp) # read input while getopts "d:Vh" options; do