mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 10:01:01 +03:00
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
|
||||
|
||||
# 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"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user