From d76a6d56cd00822b6a986632be15e97973db229b Mon Sep 17 00:00:00 2001 From: "G.J.R. Timmer" Date: Mon, 5 Jul 2021 01:22:21 +0200 Subject: [PATCH] Fix xargs do not run if empty --- root/etc/cont-init.d/30-config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config index 877ac95..cab6a93 100644 --- a/root/etc/cont-init.d/30-config +++ b/root/etc/cont-init.d/30-config @@ -23,13 +23,13 @@ if [ -f "/usr/bin/find" ] && [ -f "/usr/bin/xargs" ]; then echo "setting permissions::configuration" CORES=$(nproc --all) find /config -maxdepth 4 -mindepth 1 -path /config/workspace -prune -false -o -type d -print0 | \ - xargs --max-args=1 --max-procs=$((CORES*2*8)) \ + xargs -r --max-args=1 --max-procs=$((CORES*2*8)) \ chown -R abc:abc echo "setting permissions::workspace" chown abc:abc /config/workspace find /config/workspace -maxdepth 4 -mindepth 1 -type d -print0 | \ - xargs --max-args=1 --max-procs=$((CORES*2*16)) \ + xargs -r --max-args=1 --max-procs=$((CORES*2*16)) \ chown -R abc:abc else chown -R abc:abc \