X-Git-Url: http://git.annexia.org/?p=febootstrap.git;a=blobdiff_plain;f=febootstrap-to-initramfs.sh;h=93d415a2d1d8d595d373862719a1da0c8af51070;hp=1fdd50efb00971213d7fb69b961ed963a431114c;hb=9a05df180a5a250c86d3ef351f6334179b807028;hpb=c408cc553f0b420e82f3ed4f62722bd40148520e diff --git a/febootstrap-to-initramfs.sh b/febootstrap-to-initramfs.sh index 1fdd50e..93d415a 100755 --- a/febootstrap-to-initramfs.sh +++ b/febootstrap-to-initramfs.sh @@ -18,21 +18,25 @@ # # Written by Richard W.M. Jones +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