From: Matthijs Kooijman Date: Thu, 16 Apr 2009 13:24:05 +0000 (+0200) Subject: vserver: Don't break when no hashed files te delete. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=3dc12524a07c24998f52c2a58be15b0526326bcb;p=matthijs%2Fservers%2Fdrsnuggles.git vserver: Don't break when no hashed files te delete. Previously, if find would find no hashed files to delete, xargs would still run rm without arguments. Now it doesn't. --- diff --git a/usr/local/bin/vserver-hashify-all b/usr/local/bin/vserver-hashify-all index d1a2190..763cfbf 100755 --- a/usr/local/bin/vserver-hashify-all +++ b/usr/local/bin/vserver-hashify-all @@ -20,6 +20,6 @@ echo "Cleaning up unused hashed files..." for HASH_DIR in "$VSERVERS_CONF"/.defaults/apps/vunify/hash/*; do if [ -L "$HASH_DIR" ]; then # All symbolic links - sudo find -H "$HASH_DIR" -type f -links 1 -print0 | sudo xargs -0 rm + sudo find -H "$HASH_DIR" -type f -links 1 -print0 | sudo xargs --null --no-run-if-empty rm fi done