瀏覽代碼

support hostname env var override

Casey DeLorme 2 年之前
父節點
當前提交
32d44dbcc2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch.sh

+ 1 - 1
arch.sh

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