test_suite: remove superfluous variable

This commit is contained in:
Frank Liepold 2013-12-27 08:19:46 +01:00
parent 1def318035
commit 516b293d47
2 changed files with 26 additions and 12 deletions

View File

@ -14,10 +14,6 @@
## root access without password request to each host is required.
## see also variable main_ssh_idfile_opt (default-main.conf)
## directory (in general = checkout_mars_src_directory) to copy
## userpace tools from
install_mars_src_directory=/home/fl/mars/mars-git-hub
## directory to copy contributed tools from
## (in general = checkout_mars_contrib_src_directory)
install_mars_contrib_src_directory="/home/fl/mars/mars-contrib"
@ -64,10 +60,4 @@ install_mars_files_to_sync_list=( /boot/vmlinuz-:kernel: \
# each index in the following lists is the name of a file which must be copied
# to the specified directory on the target host
declare -g -A install_mars_userspace_target_dir_list
install_mars_userspace_target_dir_list=( \
["$install_mars_src_directory/userspace/marsadm"]="/usr/bin" \
["$install_mars_contrib_src_directory/bin/marsview"]="/usr/bin" \
["$install_mars_contrib_src_directory/lib/MARS/Resource.pm"]="/usr/share/perl5/MARS" \
["$install_mars_contrib_src_directory/lib/MARS.pm"]="/usr/share/perl5" \
)

View File

@ -23,6 +23,8 @@ function install_mars_prepare
{
install_mars_check_variables
install_mars_fill_userspace_target_dir_list
install_mars_check_access_to_remote_hosts \
"${main_host_list[@]}" "$install_mars_source_host"
@ -44,6 +46,17 @@ function install_mars_prepare
esac
}
function install_mars_fill_userspace_target_dir_list
{
install_mars_userspace_target_dir_list=( \
["$checkout_mars_src_directory/userspace/marsadm"]="/usr/bin" \
["$install_mars_contrib_src_directory/bin/marsview"]="/usr/bin" \
["$install_mars_contrib_src_directory/lib/MARS/Resource.pm"]="/usr/share/perl5/MARS" \
["$install_mars_contrib_src_directory/lib/MARS.pm"]="/usr/share/perl5" \
)
}
function install_mars_complete_filename_with_kernel_release
{
local filename_desc=$1 kernel_release=$2
@ -194,6 +207,11 @@ function install_mars_check_variables
lib_exit 1 "no source host given"
fi
if [ -z "$checkout_mars_src_directory" ]; then
lib_exit 1 "variable checkout_mars_src_directory empty"
else if [ ! -d "$checkout_mars_src_directory" ]; then
lib_exit 1 "directory checkout_mars_src_directory=$checkout_mars_src_directory does not exist"
fi
# check method specific variables
case $install_mars_method in # ((
kernel_and_modules_via_sync_from_host_to_host)
@ -204,9 +222,15 @@ function install_mars_check_variables
lib_exit 1 "variable $varname not set"
fi
done
if [ ${#install_mars_userspace_target_dir_list[*]} -eq 0 ]; then
lib_exit 1 "variable install_mars_userspace_target_dir_list not set"
local declare_string
if ! declare_string="$(declare -p install_mars_userspace_target_dir_list)"
then
lib_exit 1 "array install_mars_userspace_target_dir_list not declared"
fi
if [ "${declare_string#* -A }" = "$declare_string" ]; then
lib_exit 1 "install_mars_userspace_target_dir_list not declared as associative array"
fi
;;
*) lib_exit 1 "undefined method $install_mars_method"
esac