From 461c236542e322f16e05f87c08d59e7f1f95ce7b Mon Sep 17 00:00:00 2001 From: mxi1 Date: Mon, 19 Jul 2010 10:10:47 +0000 Subject: [PATCH] for defect 2989912, git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6790 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- .../netboot/add-on/statelite/rc.statelite | 20 +++++++++++-------- .../add-on/statelite/rc.statelite.ppc.redhat | 17 +++++++++------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite index b22fdb790..366505d3e 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite @@ -329,14 +329,18 @@ FindFile () { if [ -e ${TREEMOUNT}/${DIR}${path} ] then FOUND=1 # we found it! - ProcessType ${TREEMOUNT}/${DIR}${path} ${path} ${type} ${isChild} - if [ "${2}" = "con" ] - then - 1 - else - break - fi - + #TODO: + if [ -z $(ls ${TREEMOUNT}/${DIR}${path}) ]; then + FOUND=0 + else + ProcessType ${TREEMOUNT}/${DIR}${path} ${path} ${type} ${isChild} + if [ "${2}" = "con" ] + then + 1 + else + break + fi + fi fi done diff --git a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat index 03c1a133e..6cbe14ff9 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat @@ -330,14 +330,17 @@ FindFile () { if [ -e ${TREEMOUNT}/${DIR}${path} ] then FOUND=1 # we found it! - ProcessType ${TREEMOUNT}/${DIR}${path} ${path} ${type} ${isChild} - if [ "${2}" = "con" ] - then - 1 - else - break + if [ -z $(ls ${TREEMOUNT}/${DIR}${path}) ]; then + FOUND=0 + else + ProcessType ${TREEMOUNT}/${DIR}${path} ${path} ${type} ${isChild} + if [ "${2}" = "con" ] + then + 1 + else + break + fi fi - fi done