Busybox find now works with -exec correctly, so remove our nasty hack.

This commit is contained in:
Roy Marples 2008-04-30 16:44:29 +00:00
parent 5188fd2592
commit bdaca0baf5
2 changed files with 11 additions and 9 deletions

8
init.d/.gitignore vendored
View File

@ -30,3 +30,11 @@ net.lo
ttys
swap-blk
wscons
consolefont
hwclock
keymaps
modules
mtab
numlock
procfs
termencoding

View File

@ -28,13 +28,8 @@ cleanup_tmp_dir()
cd "${dir}"
if yesno ${wipe_tmp:-${WIPE_TMP:-yes}}; then
ebegin "Wiping ${dir} directory"
local startopts="-x . -depth" delete="-exec rm -rf -- {} ;"
if [ "${RC_UNAME}" = "Linux" ]; then
startopts=". -xdev -depth"
# busybox find / rm cannot handle --
delete="-delete"
fi
local startopts="-x . -depth"
[ "${RC_UNAME}" = "Linux" ] && startopts=". -xdev -depth"
# Faster than find
rm -rf -- [b-ikm-pr-zA-Z0-9\.]*
@ -54,8 +49,7 @@ cleanup_tmp_dir()
! -path "./journal/*" \
! -path "./.private" \
! -path "./.private/*" \
${delete} \
-type d -prune
-exec rm -rf {} \;
eend 0
else
ebegin "Cleaning ${dir} directory"