From cbedd7b03443f5cf7db142908251251c765ce3a5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B6ren=20Tempel?= Date: Tue, 10 Feb 2015 21:12:27 +0100 Subject: [PATCH] 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 --- dracut/90zfs/module-setup.sh.in | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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" } -- 2.40.0