replace rremove with rm, because rremove is not reliable

This commit is contained in:
Marc Wäckerlin
2019-01-23 13:02:11 +01:00
parent ce401ce289
commit 04b1f1589a

View File

@@ -111,7 +111,8 @@ for src in "${SOURCES[@]}"; do
echo " " "lizardfs makesnapshot -lf '${src}' '${DESTINATION}/${target}${date}'" echo " " "lizardfs makesnapshot -lf '${src}' '${DESTINATION}/${target}${date}'"
if test -n "$del"; then if test -n "$del"; then
for f in $(ls -d1 "${DESTINATION}/${target}"-* | sort -r | tail -n +"$del"); do for f in $(ls -d1 "${DESTINATION}/${target}"-* | sort -r | tail -n +"$del"); do
echo " " "lizardfs rremove -l '$f'" #echo " " "lizardfs rremove -l '$f'"
echo " " "rm -rf --one-filesystem '$f'"
done done
fi fi
else else
@@ -119,7 +120,8 @@ for src in "${SOURCES[@]}"; do
lizardfs makesnapshot -lf "${src}" "${DESTINATION}/${target}${date}" lizardfs makesnapshot -lf "${src}" "${DESTINATION}/${target}${date}"
if test -n "$del"; then if test -n "$del"; then
for f in $(ls -d1 "${DESTINATION}/${target}"-* | sort -r | tail -n +"$del"); do for f in $(ls -d1 "${DESTINATION}/${target}"-* | sort -r | tail -n +"$del"); do
lizardfs rremove -l "$f" #lizardfs rremove -l "$f"
test -d "$f" && rm -rf --one-filesystem "$f"
done done
fi fi
fi fi