Skip to content

Commit

Permalink
Without network, /etc/hostname may not exist. Create it.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrfai committed Jun 13, 2023
1 parent 5d89aba commit e403326
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/fai
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,9 @@ if [ $do_init_tasks -eq 1 ]; then
echo $HOSTNAME > /proc/sys/kernel/hostname
echo "Setting the host name: $HOSTNAME"
fi
if [ ! -f /etc/hostname ]; then
echo $HOSTNAME > /etc/hostname
fi
unset hname _nic myip

renewclass=1 # always renew class list when installing
Expand Down

0 comments on commit e403326

Please sign in to comment.