From 67126f0ad2faa88dab0b111d45ceff0b026ea83c Mon Sep 17 00:00:00 2001 From: mxi1 Date: Thu, 19 Aug 2010 14:42:31 +0000 Subject: [PATCH] fixed on defect on persistent*) option when one file/directory is copied to the persistent directory, need to check whether the parent directory exist in the persistent directory or not. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7148 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- .../share/xcat/netboot/add-on/statelite/rc.statelite | 6 ++++++ .../xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat | 7 +++++++ 2 files changed, 13 insertions(+) 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 7ffc270cc..856b0e2bc 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite @@ -304,6 +304,12 @@ ProcessType () { # make tree in persistent and tmpfs # need to check whether the option of its parent direcotry is persistent or not + TMPDIR=`dirname ${2}` + if [ ! -e ${PERSISTENT}${TMPDIR} ]; then + mkdir -p ${PERSISTENT}${TMPDIR} + echo "mkdir -p ${PERSISTENT}${TMPDIR}" >>$LOG + fi + if [ "$isChild" = "1" ]; then num=${#PLIST[@]} for ((i=0;i<$num; i++)); do 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 6b3fb0ede..842a2c983 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 @@ -303,6 +303,13 @@ ProcessType () { # make tree in persistent and tmpfs # need to check whether the option of its parent direcotry is persistent or not + + TMPDIR=`dirname ${2}` + if [ ! -e ${PERSISTENT}${TMPDIR} ]; then + mkdir -p ${PERSISTENT}${TMPDIR} + echo "mkdir -p ${PERSISTENT}${TMPDIR}" >>$LOG + fi + if [ "$isChild" = "1" ]; then num=${#PLIST[@]} for ((i=0;i<$num; i++)); do