diff --git a/xCAT-server/lib/xcat/plugins/litetree.pm b/xCAT-server/lib/xcat/plugins/litetree.pm index 43e7cdcaa..b306d7839 100644 --- a/xCAT-server/lib/xcat/plugins/litetree.pm +++ b/xCAT-server/lib/xcat/plugins/litetree.pm @@ -382,7 +382,8 @@ sub mergeArrays { if (xCAT::Utils->isAIX()) { $o = "rw"; # default option if not provided } else { - $o = "tmpfs"; + # for compatible reason, the default option is set to "tmpfs,rw" + $o = "tmpfs,rw"; } } @@ -391,7 +392,7 @@ sub mergeArrays { # TODO # let the user know the "link" option should be with # /etc/mtab - $o = "link"; + $o = "tmpfs,rw"; } # TODO: put some logic in here to make sure that ro is alone. diff --git a/xCAT-server/lib/xcat/plugins/statelite.pm b/xCAT-server/lib/xcat/plugins/statelite.pm index 7724e0f0f..2ab2a5931 100644 --- a/xCAT-server/lib/xcat/plugins/statelite.pm +++ b/xCAT-server/lib/xcat/plugins/statelite.pm @@ -243,6 +243,10 @@ sub process_request { } my $listNew = $synclist[0]; + # for compatible reason, replace "tmpfs,rw" with "link" option in xCAT 2.5 or higher + for (@{$listNew}) { + s/tmpfs,rw/link/; + } # the directory/file in litefile table must be the absolute path ("/***") foreach my $entry (@$listNew) { 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 9414a94eb..a7c40c892 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite @@ -242,16 +242,26 @@ ProcessType () { fi case "${3}" in - link) # the previous name is tmpfs,rw + link) # the previous name is tmpfs,rw if [ -d ${TMPFS}${2} ]; then - /bin/cp -r -a ${1}* ${TMPFS}${2} - echo "cp -r -a ${1}* ${TMPFS}${2}" >>$LOG + /bin/cp -r -a ${1}* ${TMPFS}${2} + echo "cp -r -a ${1}* ${TMPFS}${2}" >>$LOG else /bin/cp -r -a ${1} ${TMPFS}${2} echo "cp -r -a ${1} ${TMPFS}${2}" >>$LOG fi - # the link has already be in place on the image, so nothing else to do! - ;; + # the link has already be in place on the image, so nothing else to do! + ;; + tmpfs,rw) # which has the same meaning of "link", it exists for compatible reason + if [ -d ${TMPFS}${2} ]; then + /bin/cp -r -a ${1}* ${TMPFS}${2} + echo "cp -r -a ${1}* ${TMPFS}${2}" >>$LOG + else + /bin/cp -r -a ${1} ${TMPFS}${2} + echo "cp -r -a ${1} ${TMPFS}${2}" >>$LOG + fi + # the link has already be in place on the image, so nothing else to do! + ;; link,ro) # need to make sure its parent directory exists: if [ ! -d ${TMPFS}${PPATH} ]; then 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 ef2c27a96..67af180db 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 @@ -242,16 +242,26 @@ ProcessType () { fi case "${3}" in - link) # the previous name is tmpfs,rw + link) # the previous name is tmpfs,rw if [ -d ${TMPFS}${2} ]; then - /bin/cp -r -a ${1}* ${TMPFS}${2} - echo "cp -r -a ${1}* ${TMPFS}${2}" >>$LOG + /bin/cp -r -a ${1}* ${TMPFS}${2} + echo "cp -r -a ${1}* ${TMPFS}${2}" >>$LOG else /bin/cp -r -a ${1} ${TMPFS}${2} echo "cp -r -a ${1} ${TMPFS}${2}" >>$LOG fi - # the link has already be in place on the image, so nothing else to do! - ;; + # the link has already be in place on the image, so nothing else to do! + ;; + tmpfs,rw) # which has the same meaning of "link". It exists for compatible reason + if [ -d ${TMPFS}${2} ]; then + /bin/cp -r -a ${1}* ${TMPFS}${2} + echo "cp -r -a ${1}* ${TMPFS}${2}" >>$LOG + else + /bin/cp -r -a ${1} ${TMPFS}${2} + echo "cp -r -a ${1} ${TMPFS}${2}" >>$LOG + fi + # the link has already be in place on the image, so nothing else to do! + ;; link,ro) # need to make sure its parent directory exists: if [ ! -d ${TMPFS}${PPATH} ]; then