aboutsummaryrefslogtreecommitdiffstats
path: root/dracut/90zfs
diff options
context:
space:
mode:
authorSören Tempel <[email protected]>2015-02-10 21:12:27 +0100
committerBrian Behlendorf <[email protected]>2015-02-13 15:58:53 -0800
commitcbedd7b03443f5cf7db142908251251c765ce3a5 (patch)
tree5495a36da7a49a484d32942c1c48354463a99d2e /dracut/90zfs
parentcfbaa3c830e34b1c8920a48fd5e7196287f674eb (diff)
Write directly to $initdir
Simplify install() by removing the need for a temp file. Signed-off-by: Soeren Tempel <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #3093
Diffstat (limited to 'dracut/90zfs')
-rwxr-xr-xdracut/90zfs/module-setup.sh.in5
1 files changed, 1 insertions, 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"
}