Commit 58b702bb authored by nanahira's avatar nanahira

compat with ntp

parent b1c8c940
......@@ -7,6 +7,17 @@ set site_name MyCard Boot
# self address
set self_address {{services.address}}
# ntp address
{% if dnsmasq.ntp is defined and dnsmasq.ntp %}
{% if dnsmasq.ntp == "localhost" %}
set ntp_address ${self_address}
{% else %}
set ntp_address {{dnsmasq.ntp}}
{% endif %}
{% else %}
set ntp_address ntp.aliyun.com
{% endif %}
# set boot domain
set boot_domain ${self_address}:16980
......
......@@ -4,7 +4,7 @@
chain --autofree boot.cfg ||
echo Attempting to retrieve latest upstream version number...
chain --timeout 5000 http://${boot_domain}/version.ipxe ||
ntp ${self_address} ||
ntp ${ntp_address} ||
iseq ${cls} serial && goto ignore_cls ||
set cls:hex 1b:5b:4a # ANSI clear screen sequence - "^[[J"
set cls ${cls:string}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment