diff --git a/package/gluon-core/check_site.lua b/package/gluon-core/check_site.lua index 67035c0e9fad63b09483872e8d9d8ae942c036f6..1a6987a00fdabd755d2b2800740788601061537e 100644 --- a/package/gluon-core/check_site.lua +++ b/package/gluon-core/check_site.lua @@ -1,7 +1,7 @@ need_string 'site_code' need_string 'site_name' -need_string 'hostname_prefix' +need_string('hostname_prefix', false) need_string 'timezone' need_string_array('ntp_servers', false) diff --git a/package/gluon-core/files/lib/gluon/upgrade/030-system b/package/gluon-core/files/lib/gluon/upgrade/030-system index b31ba42e728dc2f393d3330ef2a0fc7d65e76c61..d7a6660507546a78eb6706e3388229cbf494f421 100755 --- a/package/gluon-core/files/lib/gluon/upgrade/030-system +++ b/package/gluon-core/files/lib/gluon/upgrade/030-system @@ -10,7 +10,7 @@ if not sysconfig.gluon_version then local system = uci:get_first('system', 'system') - uci:set('system', system, 'hostname', site.hostname_prefix .. '-' .. util.node_id()) + uci:set('system', system, 'hostname', (site.hostname_prefix or '') .. util.node_id()) uci:set('system', system, 'timezone', site.timezone) uci:save('system')