Whamcloud - gitweb
Branch b1_4_mountconf
authornathan <nathan>
Thu, 16 Feb 2006 01:04:40 +0000 (01:04 +0000)
committernathan <nathan>
Thu, 16 Feb 2006 01:04:40 +0000 (01:04 +0000)
b=9853
little cleanups

lustre/utils/cluster_scripts/cluster_config.sh
lustre/utils/cluster_scripts/module_config.sh
lustre/utils/cluster_scripts/verify_cluster_net.sh

index caad622..8c09030 100755 (executable)
@@ -133,7 +133,7 @@ EOF
 
 # Global variables
 # Some scripts to be called
-SCRIPTS_PATH=$"./"
+SCRIPTS_PATH=${CLUSTER_SCRIPTS_PATH:-"./"}
 MODULE_CONFIG=${SCRIPTS_PATH}$"module_config.sh"
 VERIFY_CLUSTER_NET=${SCRIPTS_PATH}$"verify_cluster_net.sh"
 GEN_HB_CONFIG=${SCRIPTS_PATH}$"gen_hb_config.sh"
@@ -185,7 +185,7 @@ shift  `expr $OPTIND - 1`
 
 # Here we expect the csv file
 if [ $# -eq 0 ]; then
-       echo >&2 $"`basename $0`: Lack csv file!"
+       echo >&2 $"`basename $0`: Missing csv file"
        usage
 fi
 
@@ -632,7 +632,7 @@ mass_config() {
                fi
 
                # Execute pdsh command to add lnet options lines to modprobe.conf/modules.conf
-               verbose_output "Adding lnet options to ${HOST_NAME}..."
+               verbose_output "Adding module options to ${HOST_NAME}..."
                COMMAND=$"echo \"${NETWORKS}\"|${MODULE_CONFIG}"
                pdsh -w ${HOST_NAME} ${COMMAND} >&2 &
                PDSH_PID[${pid_num}]=$!
index 66919ad..baff1eb 100755 (executable)
@@ -16,7 +16,7 @@ else
 fi
 
 read -r NETWORKS
-MODLINES_FILE=$"/tmp/modlines.txt"
+MODLINES_FILE=/tmp/modlines$$.txt
 START_MARKER=$"# start lustre config"
 END_MARKER=$"# end lustre config"
 
index 5a7927c..aa440c8 100755 (executable)
@@ -110,13 +110,13 @@ local_check() {
        HOST_IPADDRS[$2]=`egrep "[[:space:]]$1([[:space:]]|$)" /etc/hosts \
                     | awk '{print $1}'`
        if [ -z "${HOST_IPADDRS[$2]}" ]; then
-               echo >&2 "`basename $0`: local_cleck() error: $1 does not" \
+               echo >&2 "`basename $0`: local_check() error: $1 does not" \
                         "exist in the local /etc/hosts table!"
                return 1
        fi
 
        if [ ${#HOST_IPADDRS[$2]} -gt 15 ]; then
-               echo >&2 "`basename $0`: local_cleck() error: More than one" \
+               echo >&2 "`basename $0`: local_check() error: More than one" \
                         "IP address line according to $1 in the local" \
                         "/etc/hosts table!"
                return 1
@@ -125,14 +125,14 @@ local_check() {
        # Execute pdsh command to get the real host name
        RET_STR=`pdsh -w ${HOST_IPADDRS[$2]} hostname 2>&1`
        if [ $? -ne 0 ] || [ "${RET_STR}" != "${RET_STR#*connect:*}" ]; then
-               echo >&2 "`basename $0`: local_cleck() error: pdsh error:" \
+               echo >&2 "`basename $0`: local_check() error: pdsh error:" \
                         "${RET_STR}"
                return 1
        fi
 
        if [ -z "${RET_STR}" ]; then
-               echo >&2 "`basename $0`: local_cleck() error: pdsh error:" \
-                        "Nothing get from pdsh! Check the network connectivity"\
+               echo >&2 "`basename $0`: local_check() error: pdsh error:" \
+                        "No results from pdsh! Check the network connectivity"\
                         "between the local host and ${HOST_IPADDRS[$2]}" \
                         "or check the two hosts' rcmd module!"
                return 1
@@ -140,7 +140,7 @@ local_check() {
 
        REAL_NAME=`echo ${RET_STR} | awk '{print $2}'`
        if [ "$1" != "${REAL_NAME}" ]; then
-               echo >&2 "`basename $0`: local_cleck() error: The real hostname"\
+               echo >&2 "`basename $0`: local_check() error: The real hostname"\
                         "according to ${HOST_IPADDRS[$2]} is ${REAL_NAME}," \
                         "not $1! Check the local /etc/hosts table!"
                return 1