From 3f3b504df809d33c796710aee3d8b2981f64a655 Mon Sep 17 00:00:00 2001 From: mxi1 Date: Mon, 25 Jan 2010 10:41:32 +0000 Subject: [PATCH] add one checkpoint for this situation when the directory already exists during booting up git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5031 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- .../share/xcat/netboot/add-on/statelite/rc.statelite | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 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 cb199e32d..9c99d4cce 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite @@ -145,8 +145,14 @@ ProcessType () { case "${3}" in tmpfs,rw) - cp -a ${1} ${TMPFS}${2} - echo "cp -a ${1} ${TMPFS}${2}" >>$LOG + if [ ! -d ${TMPFS}${2} ] + then + cp -a ${1} ${TMPFS}${2} + echo "cp -a ${1} ${TMPFS}${2}" >>$LOG + else + cp -a ${1}* ${TMPFS}${2} + echo "cp -a ${1}/* ${TMPFS}${2}/" >>$LOG + fi # the link will already be in place on the image, so nothing else to do! #mount -n --bind ${TMPFS}${2} ${1} ;;