From: Sören Tempel Date: Tue, 10 Feb 2015 20:12:27 +0000 (+0100) Subject: Write directly to $initdir X-Git-Tag: zfs-0.6.4~47 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cbedd7b03443f5cf7db142908251251c765ce3a5;p=zfs Write directly to $initdir Simplify install() by removing the need for a temp file. Signed-off-by: Soeren Tempel Signed-off-by: Brian Behlendorf Issue #3093 --- diff --git a/dracut/90zfs/module-setup.sh.in b/dracut/90zfs/module-setup.sh.in index 2d0b335cf..b7a6f1d45 100755 --- a/dracut/90zfs/module-setup.sh.in +++ b/dracut/90zfs/module-setup.sh.in @@ -46,12 +46,9 @@ install() { fi # Synchronize initramfs and system hostid - TMP=`mktemp` AA=`hostid | cut -b 1,2` BB=`hostid | cut -b 3,4` CC=`hostid | cut -b 5,6` DD=`hostid | cut -b 7,8` - printf "\x$DD\x$CC\x$BB\x$AA" >$TMP - inst_simple "$TMP" /etc/hostid - rm "$TMP" + printf "\x$DD\x$CC\x$BB\x$AA" > "$initdir/etc/hostid" }