From: Harald Hoyer Date: Thu, 27 Sep 2012 08:18:29 +0000 (+0200) Subject: dracut.sh: create the initramfs non-world readable X-Git-Tag: 024~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1b48995c26c4f06d1a718539cb1bd5b0179af91;p=thirdparty%2Fdracut.git dracut.sh: create the initramfs non-world readable --- diff --git a/dracut.sh b/dracut.sh index 7148d0f3c..96faa061b 100755 --- a/dracut.sh +++ b/dracut.sh @@ -1033,8 +1033,9 @@ if [[ $do_hardlink = yes ]] ; then } fi +rm -f "$outfile" dinfo "*** Creating image file ***" -if ! ( cd "$initdir"; find . |cpio -R 0:0 -H newc -o --quiet| \ +if ! ( umask 077; cd "$initdir"; find . |cpio -R 0:0 -H newc -o --quiet| \ $compress > "$outfile"; ); then dfatal "dracut: creation of $outfile failed" exit 1