From 031cf69e0ce5c044200fa76504c0f28014720dea Mon Sep 17 00:00:00 2001 From: Bohan Yang Date: Mon, 13 May 2019 20:20:10 +0800 Subject: [PATCH] Update --- netboot.sh | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/netboot.sh b/netboot.sh index 66367b0..86c9999 100644 --- a/netboot.sh +++ b/netboot.sh @@ -157,25 +157,27 @@ while [ $# -gt 0 ]; do shift done -case "$DEBI_PRESET" in - china) - DEBI_NS=${DEBI_NS:-156.154.70.5 156.154.71.5} - DEBI_PROTOCOL=${DEBI_PROTOCOL:-https} - DEBI_MIRROR=${DEBI_MIRROR:-chinanet.mirrors.ustc.edu.cn} - DEBI_TIMEZONE=${DEBI_TIMEZONE:-Asia/Shanghai} - DEBI_NTP=${DEBI_NTP:-cn.ntp.org.cn} - DEBI_SECURITY=${DEBI_SECURITY:-true} - ;; - cloud) - DEBI_PROTOCOL=${DEBI_PROTOCOL:-https} - DEBI_MIRROR=${DEBI_MIRROR:-cdn-aws.deb.debian.org} - DEBI_NTP=${DEBI_NTP:-time.google.com} - DEBI_SECURITY=${DEBI_SECURITY:-true} - ;; - *) - echo_stderr "Error: No such preset $DEBI_PRESET" - exit 1 -esac +if [ -n "$DEBI_PRESET" ]; then + case "$DEBI_PRESET" in + china) + DEBI_NS=${DEBI_NS:-156.154.70.5 156.154.71.5} + DEBI_PROTOCOL=${DEBI_PROTOCOL:-https} + DEBI_MIRROR=${DEBI_MIRROR:-chinanet.mirrors.ustc.edu.cn} + DEBI_TIMEZONE=${DEBI_TIMEZONE:-Asia/Shanghai} + DEBI_NTP=${DEBI_NTP:-cn.ntp.org.cn} + DEBI_SECURITY=${DEBI_SECURITY:-true} + ;; + cloud) + DEBI_PROTOCOL=${DEBI_PROTOCOL:-https} + DEBI_MIRROR=${DEBI_MIRROR:-cdn-aws.deb.debian.org} + DEBI_NTP=${DEBI_NTP:-time.google.com} + DEBI_SECURITY=${DEBI_SECURITY:-true} + ;; + *) + echo_stderr "Error: No such preset $DEBI_PRESET" + exit 1 + esac +fi DEBI_SUITE=${DEBI_SUITE:-stretch} DEBI_NEW="debian-$DEBI_SUITE"