Browse Source

support hostname env var override

Casey DeLorme 2 years ago
parent
commit
32d44dbcc2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      arch.sh

+ 1 - 1
arch.sh

@@ -31,7 +31,7 @@ locale-gen
 echo "LANG=en_US.UTF-8" > /etc/locale.conf
 echo "LANG=en_US.UTF-8" > /etc/locale.conf
 
 
 # setup hostname
 # setup hostname
-echo "arch" > /etc/hostname
+echo "${hostname:-arch}" > /etc/hostname
 echo "127.0.0.1 localhost" > /etc/hosts
 echo "127.0.0.1 localhost" > /etc/hosts
 echo "::1 localhost" >> /etc/hosts
 echo "::1 localhost" >> /etc/hosts
 echo "127.0.1.1 $(cat /etc/hostname).localdomain $(cat /etc/hostname)" >> /etc/hosts
 echo "127.0.1.1 $(cat /etc/hostname).localdomain $(cat /etc/hostname)" >> /etc/hosts