From 6193ef2285f90e23b28fae5c1a43f7ffaa710f21 Mon Sep 17 00:00:00 2001
From: Cyril Brulebois <cyril.brulebois@kerlabs.com>
Date: Fri, 23 Jan 2009 22:21:18 +0100
Subject: Actually fix initrd-related breakage in chroot hacks.

To actually handle the case where there are no initrds, one has to tell
xargs not to run the chmod command if there are no parameters.
---
 helpers/lh_chroot_hacks | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/helpers/lh_chroot_hacks b/helpers/lh_chroot_hacks
index c635909..2c97111 100755
--- a/helpers/lh_chroot_hacks
+++ b/helpers/lh_chroot_hacks
@@ -78,7 +78,7 @@ fi
 # protect GPG keys, which live-helper does not support.
 # Note: Use find rather than chmod on the wildcard, one never knows what
 # people might do in local hooks, and there might be no initrds at all.
-find chroot/boot -name 'initrd*' -print0 | xargs -0 chmod go+r
+find chroot/boot -name 'initrd*' -print0 | xargs -r -0 chmod go+r
 
 # Remove build systems clock drift
 echo "0.0 0 0.0" > chroot/etc/adjtime
-- 
cgit v1.0