#
# Written by Richard W.M. Jones <rjones@redhat.com>
+unset CDPATH
+
if [ $# -ne 1 ]; then
echo "febootstrap-to-initramfs DIR > initrd.img"
exit 1
fi
-cd "$1"
+cd "$1" > /dev/null
if [ ! -f fakeroot.log -a $(id -u) -ne 0 ]; then
echo "no fakeroot.log and not running as root"
exit 1
fi
+set -e
+
if [ -f fakeroot.log ]; then
fakeroot -i fakeroot.log \
- sh -c 'find -not -name fakeroot.log -a -print0 | cpio -o0c | gzip --best'
+ sh -c 'find -not -name fakeroot.log -a -print0 | cpio -o -0 -H newc | gzip --best'
else
- find -not -name fakeroot.log -a -print0 | cpio -o0c | gzip --best
+ find -not -name fakeroot.log -a -print0 | cpio -o -0 -H newc | gzip --best
fi