Write directly to $initdir
Simplify install() by removing the need for a temp file. Signed-off-by: Soeren Tempel <soeren+git@soeren-tempel.net> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #3093
This commit is contained in:
parent
cfbaa3c830
commit
cbedd7b034
|
@ -46,12 +46,9 @@ install() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Synchronize initramfs and system hostid
|
# Synchronize initramfs and system hostid
|
||||||
TMP=`mktemp`
|
|
||||||
AA=`hostid | cut -b 1,2`
|
AA=`hostid | cut -b 1,2`
|
||||||
BB=`hostid | cut -b 3,4`
|
BB=`hostid | cut -b 3,4`
|
||||||
CC=`hostid | cut -b 5,6`
|
CC=`hostid | cut -b 5,6`
|
||||||
DD=`hostid | cut -b 7,8`
|
DD=`hostid | cut -b 7,8`
|
||||||
printf "\x$DD\x$CC\x$BB\x$AA" >$TMP
|
printf "\x$DD\x$CC\x$BB\x$AA" > "$initdir/etc/hostid"
|
||||||
inst_simple "$TMP" /etc/hostid
|
|
||||||
rm "$TMP"
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue