Whamcloud - gitweb
Export environment variable PATH in remote command.
authoryujian <yujian>
Tue, 5 Sep 2006 13:35:27 +0000 (13:35 +0000)
committeryujian <yujian>
Tue, 5 Sep 2006 13:35:27 +0000 (13:35 +0000)
lustre/scripts/lc_cluman.sh.in
lustre/scripts/lc_net.sh.in
lustre/scripts/lustre_config.sh.in

index c122c42..e77c930 100644 (file)
@@ -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:"\
index e4f150c..26fe899 100644 (file)
@@ -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}!"
index d703029..5ee082f 100644 (file)
@@ -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]}"\