container-puppet.sh: add -r to rm command
When purging config files, it can happen that we try to remove a directory. Example for the ironic_pxe container: rm: cannot remove ‘/var/lib/config-data/puppet-generated/ironic/etc/my.cnf.d/’: Is a directory So just add -r to the rm command, so the purge can finish. Depends-On: https://review.opendev.org/#/c/705757/ Change-Id: Ib821cfc95e4349b681c08ac86ad97b742c933983
This commit is contained in:
parent
c2eeafdd2b
commit
60f043378e
|
@ -121,7 +121,7 @@ if [ -z "$NO_ARCHIVE" ]; then
|
|||
echo "Ensuring the removed config files are also purged in ${puppet_generated_path}:"
|
||||
cat $TMPFILE | sort
|
||||
cat $TMPFILE | xargs -n1 -r -I{} \
|
||||
bash -c "rm -f ${puppet_generated_path}/{}"
|
||||
bash -c "rm -rf ${puppet_generated_path}/{}"
|
||||
exec 5>&1
|
||||
exec 1>$TMPFILE2
|
||||
find $rsync_srcs -newer $origin_of_time -not -path '/etc/puppet*' -print0
|
||||
|
|
Loading…
Reference in New Issue