From e81b75e2bd1fbb9b0e2f1056f8792299a0c990b2 Mon Sep 17 00:00:00 2001 From: yujian Date: Tue, 5 Sep 2006 13:35:27 +0000 Subject: [PATCH] Export environment variable PATH in remote command. --- lustre/scripts/lc_cluman.sh.in | 2 +- lustre/scripts/lc_net.sh.in | 2 +- lustre/scripts/lustre_config.sh.in | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lustre/scripts/lc_cluman.sh.in b/lustre/scripts/lc_cluman.sh.in index c122c42..e77c930 100644 --- a/lustre/scripts/lc_cluman.sh.in +++ b/lustre/scripts/lc_cluman.sh.in @@ -181,7 +181,7 @@ cluman_running() { local host_name=$1 local ret_str - ret_str=`${REMOTE} ${host_name} "service clumanager status" 2>&1` + ret_str=`${REMOTE} ${host_name} "/sbin/service clumanager status" 2>&1` if [ $? -ne 0 ]; then if [ "${ret_str}" != "${ret_str#*unrecognized*}" ]; then echo >&2 "`basename $0`: cluman_running() error:"\ diff --git a/lustre/scripts/lc_net.sh.in b/lustre/scripts/lc_net.sh.in index e4f150c..26fe899 100644 --- a/lustre/scripts/lc_net.sh.in +++ b/lustre/scripts/lc_net.sh.in @@ -141,7 +141,7 @@ remote_check() { # Execute remote command to check whether ${HOST_NAMES[i]} # can resolve its own name cmd="ping -c1 ${HOST_NAMES[i]} 2>&1" - ret_str=`${REMOTE} ${HOST_NAMES[i]} "${cmd}" 2>&1` + ret_str=`${REMOTE} ${HOST_NAMES[i]} "(${EXPORT_PATH} ${cmd})" 2>&1` if [ $? -ne 0 -a -n "${ret_str}" ]; then echo >&2 "`basename $0`: remote_check() error:"\ "remote to ${HOST_NAMES[i]} error: ${ret_str}!" diff --git a/lustre/scripts/lustre_config.sh.in b/lustre/scripts/lustre_config.sh.in index d703029..5ee082f 100644 --- a/lustre/scripts/lustre_config.sh.in +++ b/lustre/scripts/lustre_config.sh.in @@ -895,7 +895,7 @@ check_lnet() { # Execute remote command to start lnet network verbose_output "Starting lnet network in ${HOST_NAME[i]}" COMMAND=$"modprobe lnet; ${LCTL} network up 2>&1" - RET_STR=`${REMOTE} ${HOST_NAME[i]} "${COMMAND}" 2>&1` + RET_STR=`${REMOTE} ${HOST_NAME[i]} "(${EXPORT_PATH} ${COMMAND})" 2>&1` if [ $? -ne 0 -o "${RET_STR}" = "${RET_STR#*LNET configured*}" ] then echo >&2 "`basename $0`: check_lnet() error: remote" \ @@ -982,7 +982,7 @@ mass_config() { COMMAND="mkdir -p ${MOUNT_POINT[i]}" verbose_output "Creating the mount point ${MOUNT_POINT[i]} on" \ "${HOST_NAME[i]}" - ${REMOTE} ${HOST_NAME[i]} "${COMMAND}" >&2 + ${REMOTE} ${HOST_NAME[i]} "(${EXPORT_PATH} ${COMMAND})" >&2 if [ $? -ne 0 ]; then echo >&2 "`basename $0`: mass_config() error:"\ "Failed to execute remote command to"\ @@ -1110,7 +1110,7 @@ modify_fstab() { COMMAND=". @scriptlibdir@/lc_common.sh; \ sed -i \"/^${device_name}\t/d\" \$(fcanon /etc/fstab); \ echo -e \"${mntent}\" >> \$(fcanon /etc/fstab)" - ${REMOTE} ${HOST_NAME[i]} "${COMMAND}" >&2 + ${REMOTE} ${HOST_NAME[i]} "(${EXPORT_PATH} ${COMMAND})" >&2 if [ $? -ne 0 ]; then echo >&2 "`basename $0`: modify_fstab() error:"\ "Failed to modify /etc/fstab of host ${HOST_NAME[i]}"\ -- 1.8.3.1