diff --git a/xCAT/postscripts/aixlitesetup b/xCAT/postscripts/aixlitesetup index 117c853ea..52cf24cbe 100644 --- a/xCAT/postscripts/aixlitesetup +++ b/xCAT/postscripts/aixlitesetup @@ -258,13 +258,14 @@ FindFile () { # ex. /.statelite/mnt/10.2.0.200/etc/FScfg # ex. /.statelite/mnt/10.2.0.200/root/ssh/ if [ -e ${SRC} ]; then - PATHEND=`expr ${#path} - 1` # get the last char of the path - if [ ${path[${PATHEND}]} -ne '/' ] && [ -d ${SRC} ]; then + PATHEND=${#path} + CHAREND=`echo ${path} |cut -c${PATHEND}` + if [ ${CHAREND} -ne '/' ] && [ -d ${SRC} ]; then FOUND=0 continue fi - if [ ${path[${PATHEND}]} -eq "/" ] && [ -f ${SRC} ]; then + if [ ${CHAREND} -eq "/" ] && [ -f ${SRC} ]; then FOUND=0 continue fi