mirror of
https://github.com/bohanyang/debi.git
synced 2026-09-27 06:26:15 +00:00
Refine
This commit is contained in:
+17
-8
@@ -64,7 +64,7 @@ while [ $# -gt 0 ]; do
|
|||||||
SECURITY=$2
|
SECURITY=$2
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--upgrade)
|
-upgrade)
|
||||||
UPGRADE=$2
|
UPGRADE=$2
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
@@ -105,7 +105,6 @@ case "$COUNTRY" in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
COUNTRY=${COUNTRY:-US}
|
COUNTRY=${COUNTRY:-US}
|
||||||
FQDN=${FQDN:-localhost.localdomain}
|
|
||||||
PROTO=${PROTO:-https}
|
PROTO=${PROTO:-https}
|
||||||
HOST=${HOST:-dpvctowv9b08b.cloudfront.net}
|
HOST=${HOST:-dpvctowv9b08b.cloudfront.net}
|
||||||
DIR=${DIR:-/debian}
|
DIR=${DIR:-/debian}
|
||||||
@@ -141,6 +140,10 @@ cd "$BOOT"
|
|||||||
|
|
||||||
cat >> preseed.cfg << EOF
|
cat >> preseed.cfg << EOF
|
||||||
# COUNTRY: 1
|
# COUNTRY: 1
|
||||||
|
# IP_ADDR: 2
|
||||||
|
# NETMASK: 2
|
||||||
|
# GATEWAY: 2
|
||||||
|
# DNS: 2
|
||||||
# FQDN: 2
|
# FQDN: 2
|
||||||
# PROTO: 3
|
# PROTO: 3
|
||||||
# HOST: 3
|
# HOST: 3
|
||||||
@@ -151,6 +154,7 @@ cat >> preseed.cfg << EOF
|
|||||||
# TIMEZONE: 5
|
# TIMEZONE: 5
|
||||||
# NTP: 5
|
# NTP: 5
|
||||||
# SECURITY: 8
|
# SECURITY: 8
|
||||||
|
# INCLUDE: 9
|
||||||
# UPGRADE: 9
|
# UPGRADE: 9
|
||||||
|
|
||||||
# 1. Localization: COUNTRY
|
# 1. Localization: COUNTRY
|
||||||
@@ -161,7 +165,7 @@ d-i debian-installer/country string {{-COUNTRY-}}
|
|||||||
d-i debian-installer/locale string en_US.UTF-8
|
d-i debian-installer/locale string en_US.UTF-8
|
||||||
d-i keyboard-configuration/xkb-keymap select us
|
d-i keyboard-configuration/xkb-keymap select us
|
||||||
|
|
||||||
# 2. Network configuration: FQDN
|
# 2. Network configuration: IP_ADDR, NETMASK, GATEWAY, DNS, FQDN
|
||||||
|
|
||||||
d-i netcfg/choose_interface select auto
|
d-i netcfg/choose_interface select auto
|
||||||
EOF
|
EOF
|
||||||
@@ -182,9 +186,15 @@ if [ -n "$IP_ADDR" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
cat >> preseed.cfg << EOF
|
cat >> preseed.cfg << EOF
|
||||||
d-i netcfg/get_hostname string unassigned-hostname
|
d-i netcfg/get_hostname string localhost
|
||||||
d-i netcfg/get_domain string unassigned-domain
|
d-i netcfg/get_domain string localdomain
|
||||||
d-i netcfg/hostname string {{-FQDN-}}
|
EOF
|
||||||
|
|
||||||
|
if [ -n "$FQDN" ]; then
|
||||||
|
echo "d-i netcfg/hostname string $FQDN" >> preseed.cfg
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat >> preseed.cfg << EOF
|
||||||
d-i hw-detect/load_firmware boolean true
|
d-i hw-detect/load_firmware boolean true
|
||||||
|
|
||||||
# 3. Mirror settings: PROTO, HOST, DIR, SUITE
|
# 3. Mirror settings: PROTO, HOST, DIR, SUITE
|
||||||
@@ -237,7 +247,7 @@ d-i apt-setup/services-select multiselect updates
|
|||||||
d-i apt-setup/local0/repository string {{-SECURITY-}} {{-SUITE-}}/updates main
|
d-i apt-setup/local0/repository string {{-SECURITY-}} {{-SUITE-}}/updates main
|
||||||
d-i apt-setup/local0/source boolean true
|
d-i apt-setup/local0/source boolean true
|
||||||
|
|
||||||
# 9. Package selection: TASKS, UPGRADE
|
# 9. Package selection: INCLUDE, UPGRADE
|
||||||
|
|
||||||
tasksel tasksel/first multiselect ssh-server
|
tasksel tasksel/first multiselect ssh-server
|
||||||
EOF
|
EOF
|
||||||
@@ -257,7 +267,6 @@ d-i grub-installer/bootdev string default
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
sed -i 's/{{-COUNTRY-}}/'"$COUNTRY"'/g' preseed.cfg
|
sed -i 's/{{-COUNTRY-}}/'"$COUNTRY"'/g' preseed.cfg
|
||||||
sed -i 's/{{-FQDN-}}/'"$FQDN"'/g' preseed.cfg
|
|
||||||
sed -i 's/{{-PROTO-}}/'"$PROTO"'/g' preseed.cfg
|
sed -i 's/{{-PROTO-}}/'"$PROTO"'/g' preseed.cfg
|
||||||
sed -i 's/{{-HOST-}}/'"$HOST"'/g' preseed.cfg
|
sed -i 's/{{-HOST-}}/'"$HOST"'/g' preseed.cfg
|
||||||
sed -i 's/{{-DIR-}}/'$(echo "$DIR" | sed 's/\//\\\//g')'/g' preseed.cfg
|
sed -i 's/{{-DIR-}}/'$(echo "$DIR" | sed 's/\//\\\//g')'/g' preseed.cfg
|
||||||
|
|||||||
Reference in New Issue
Block a user