2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-16 19:30:26 +00:00

Merge pull request #2369 from bybai/statelite

fix 2090 delete underlying files for ro statelite mounts
This commit is contained in:
yangsong
2017-01-05 14:40:22 +08:00
committed by GitHub

View File

@ -460,15 +460,11 @@ ProcessType () {
CHAREND=`echo ${STRPATH} | /usr/bin/cut -c${STRLEN}`
if [ "${CHAREND}" = "/" ]; then # it is one directory
if [ ! -d ${STRPATH} ]; then
/bin/rm -rf ${STRPATH}
/bin/mkdir ${STRPATH}
fi
else
if [ ! -f ${STRPATH} ]; then
/bin/rm -rf ${STRPATH}
/bin/touch ${STRPATH}
fi
fi
echo "mout --bind -o ro ${1} ${MNTDIR}${2}" >>$LOG 2>&1