Explorar o código

installer: default hostname to 'void' if unset

without this you could end up with an empty hostname
classabbyamp %!s(int64=2) %!d(string=hai) anos
pai
achega
58a5cbc1f2
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      installer.sh.in

+ 2 - 1
installer.sh.in

@@ -624,7 +624,8 @@ menu_hostname() {
 }
 
 set_hostname() {
-    echo $(get_option HOSTNAME) > $TARGETDIR/etc/hostname
+    local hostname="$(get_option HOSTNAME)"
+    echo "${hostname:-void}" > $TARGETDIR/etc/hostname
 }
 
 menu_rootpassword() {