[icinga-checkins] icinga.org: icinga-web/r1.8: better clearcache handling with find

git at icinga.org git at icinga.org
Thu Nov 29 17:39:09 CET 2012


Module: icinga-web
Branch: r1.8
Commit: 753cafed4db1ead78b816e4bde0b5fa0ba86e15c
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=753cafed4db1ead78b816e4bde0b5fa0ba86e15c

Author: Markus Frosch <markus.frosch at netways.de>
Date:   Wed Nov 14 16:37:55 2012 +0100

better clearcache handling with find

Avoids globing via rm $DIR/* and also does not interfere
with bash aliases for rm.

Should be non GNU safe...

---

 bin/clearcache.sh.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/clearcache.sh.in b/bin/clearcache.sh.in
index 60d29d6..f80be01 100644
--- a/bin/clearcache.sh.in
+++ b/bin/clearcache.sh.in
@@ -43,7 +43,7 @@ for CUR_CDIR in $CCDIR; do
 
 		msg_start "Deleting cache from $CUR_CNAME ($CC_FILES files)"
 
-		rm $CUR_CDIR/* > /dev/null 2>&1
+		find $CUR_CDIR/ -type f -exec rm {} \;
 
 		msg_result
 





More information about the icinga-checkins mailing list