Busybox find now works with -exec correctly, so remove our nasty hack.
This commit is contained in:
parent
5188fd2592
commit
bdaca0baf5
8
init.d/.gitignore
vendored
8
init.d/.gitignore
vendored
@ -30,3 +30,11 @@ net.lo
|
|||||||
ttys
|
ttys
|
||||||
swap-blk
|
swap-blk
|
||||||
wscons
|
wscons
|
||||||
|
consolefont
|
||||||
|
hwclock
|
||||||
|
keymaps
|
||||||
|
modules
|
||||||
|
mtab
|
||||||
|
numlock
|
||||||
|
procfs
|
||||||
|
termencoding
|
||||||
|
@ -28,13 +28,8 @@ cleanup_tmp_dir()
|
|||||||
cd "${dir}"
|
cd "${dir}"
|
||||||
if yesno ${wipe_tmp:-${WIPE_TMP:-yes}}; then
|
if yesno ${wipe_tmp:-${WIPE_TMP:-yes}}; then
|
||||||
ebegin "Wiping ${dir} directory"
|
ebegin "Wiping ${dir} directory"
|
||||||
local startopts="-x . -depth" delete="-exec rm -rf -- {} ;"
|
local startopts="-x . -depth"
|
||||||
|
[ "${RC_UNAME}" = "Linux" ] && startopts=". -xdev -depth"
|
||||||
if [ "${RC_UNAME}" = "Linux" ]; then
|
|
||||||
startopts=". -xdev -depth"
|
|
||||||
# busybox find / rm cannot handle --
|
|
||||||
delete="-delete"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Faster than find
|
# Faster than find
|
||||||
rm -rf -- [b-ikm-pr-zA-Z0-9\.]*
|
rm -rf -- [b-ikm-pr-zA-Z0-9\.]*
|
||||||
@ -54,8 +49,7 @@ cleanup_tmp_dir()
|
|||||||
! -path "./journal/*" \
|
! -path "./journal/*" \
|
||||||
! -path "./.private" \
|
! -path "./.private" \
|
||||||
! -path "./.private/*" \
|
! -path "./.private/*" \
|
||||||
${delete} \
|
-exec rm -rf {} \;
|
||||||
-type d -prune
|
|
||||||
eend 0
|
eend 0
|
||||||
else
|
else
|
||||||
ebegin "Cleaning ${dir} directory"
|
ebegin "Cleaning ${dir} directory"
|
||||||
|
Loading…
Reference in New Issue
Block a user