aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/scripts/configure.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripts/configure.sh')
-rw-r--r--src/scripts/configure.sh30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/scripts/configure.sh b/src/scripts/configure.sh
index 64d9440..e3dfb7e 100644
--- a/src/scripts/configure.sh
+++ b/src/scripts/configure.sh
@@ -78,6 +78,8 @@ configure_all()
78 echo "CONFIG_PART_TYPE=${CONFIG_PART_TYPE}" >> ${CONFIG}.new.tmp 78 echo "CONFIG_PART_TYPE=${CONFIG_PART_TYPE}" >> ${CONFIG}.new.tmp
79 echo "CONFIG_PART_SIZE=${CONFIG_PART_SIZE}" >> ${CONFIG}.new.tmp 79 echo "CONFIG_PART_SIZE=${CONFIG_PART_SIZE}" >> ${CONFIG}.new.tmp
80 echo "CONFIG_IMG_SIZE=${CONFIG_IMG_SIZE}" >> ${CONFIG}.new.tmp 80 echo "CONFIG_IMG_SIZE=${CONFIG_IMG_SIZE}" >> ${CONFIG}.new.tmp
81 echo "CONFIG_TLS_CHECK=${CONFIG_TLS_CHECK}" >> ${CONFIG}.new.tmp
82 echo "CONFIG_RUN_ISOHYBRID=${CONFIG_RUN_ISOHYBRID}" >> ${CONFIG}.new.tmp
81 83
82 # copy new settings into place 84 # copy new settings into place
83 mv ${CONFIG}.new.tmp ${CONFIG}.new 85 mv ${CONFIG}.new.tmp ${CONFIG}.new
@@ -107,6 +109,7 @@ configure_disk()
107 20 70 13 \ 109 20 70 13 \
108 "usb" "USB partition type (${CONFIG_PART_TYPE})" \ 110 "usb" "USB partition type (${CONFIG_PART_TYPE})" \
109 "size" "USB disk image size (${CONFIG_IMG_SIZE} MB)" \ 111 "size" "USB disk image size (${CONFIG_IMG_SIZE} MB)" \
112 "isohybrid" "Support MBR booting ISO (${CONFIG_RUN_ISOHYBRID})" \
110 "tls" "TLS Certificate check (${CONFIG_TLS_CHECK})" \ 113 "tls" "TLS Certificate check (${CONFIG_TLS_CHECK})" \
111 2>&1 1>&3)" 114 2>&1 1>&3)"
112 RC=$? 115 RC=$?
@@ -155,11 +158,34 @@ configure_disk()
155 --msgbox "Invalid disk image size. Size must be specified as number of megabytes." \ 158 --msgbox "Invalid disk image size. Size must be specified as number of megabytes." \
156 7 40 159 7 40
157 fi 160 fi
161 elif test $RC -eq 0 && test "x${RESULT}" == "xisohybrid";then
162 if test "x${CONFIG_RUN_ISOHYBRID}" == "xno";then
163 YESNO_DEFAULT=--defaultno
164 fi
165 exec 3>&1
166 RESULT="$(echo "" | xargs dialog \
167 --title " MBR Bootable ISO " \
168 --backtitle "IP Engineering Rescue Disk Setup" \
169 ${YESNO_DEFAULT} \
170 --yesno "\nAdding MBR information to an ISO image allows the image to be\ncopied to a directly to a device such as a USB thumbdrive.\n\nAdd MBR information to ISO images?" \
171 10 70 \
172 2>&1 1>&3)"
173 RC=$?
174 exec 3>&-
175 if test $RC -eq 0;then
176 CONFIG_RUN_ISOHYBRID=yes
177 else
178 CONFIG_RUN_ISOHYBRID=no
179 fi
158 elif test $RC -eq 0 && test "x${RESULT}" == "xtls";then 180 elif test $RC -eq 0 && test "x${RESULT}" == "xtls";then
181 if test "x${CONFIG_TLS_CHECK}" == "xno";then
182 YESNO_DEFAULT=--defaultno
183 fi
159 exec 3>&1 184 exec 3>&1
160 RESULT="$(echo "" | xargs dialog \ 185 RESULT="$(echo "" | xargs dialog \
161 --title " TLS Certificate Checks " \ 186 --title " TLS Certificate Checks " \
162 --backtitle "IP Engineering Rescue Disk Setup" \ 187 --backtitle "IP Engineering Rescue Disk Setup" \
188 ${YESNO_DEFAULT} \
163 --yesno "\nEnable TLS certificate checks when downloading files?" \ 189 --yesno "\nEnable TLS certificate checks when downloading files?" \
164 7 70 \ 190 7 70 \
165 2>&1 1>&3)" 191 2>&1 1>&3)"
@@ -263,7 +289,7 @@ configure_distros_image()
263configure_save() 289configure_save()
264{ 290{
265 # save variables 291 # save variables
266 for STR in "CONFIG_PART_TYPE" "CONFIG_IMG_SIZE" "CONFIG_TLS_CHECK";do 292 for STR in "CONFIG_PART_TYPE" "CONFIG_IMG_SIZE" "CONFIG_TLS_CHECK" "CONFIG_RUN_ISOHYBRID";do
267 egrep "^${STR}=" "${CONFIG}.new" > /dev/null 293 egrep "^${STR}=" "${CONFIG}.new" > /dev/null
268 if test $? -ne 0;then 294 if test $? -ne 0;then
269 echo "${STR}=" >> "${CONFIG}.new" 295 echo "${STR}=" >> "${CONFIG}.new"
@@ -274,6 +300,7 @@ configure_save()
274 -e "s/^CONFIG_PART_TYPE=.*$/CONFIG_PART_TYPE=${CONFIG_PART_TYPE}/g" \ 300 -e "s/^CONFIG_PART_TYPE=.*$/CONFIG_PART_TYPE=${CONFIG_PART_TYPE}/g" \
275 -e "s/^CONFIG_PART_SIZE=.*$/CONFIG_PART_SIZE=${CONFIG_PART_SIZE}/g" \ 301 -e "s/^CONFIG_PART_SIZE=.*$/CONFIG_PART_SIZE=${CONFIG_PART_SIZE}/g" \
276 -e "s/^CONFIG_TLS_CHECK=.*$/CONFIG_TLS_CHECK=${CONFIG_TLS_CHECK}/g" \ 302 -e "s/^CONFIG_TLS_CHECK=.*$/CONFIG_TLS_CHECK=${CONFIG_TLS_CHECK}/g" \
303 -e "s/^CONFIG_RUN_ISOHYBRID=.*$/CONFIG_RUN_ISOHYBRID=${CONFIG_RUN_ISOHYBRID}/g" \
277 "${CONFIG}.new" \ 304 "${CONFIG}.new" \
278 > "${CONFIG}.new.tmp" 305 > "${CONFIG}.new.tmp"
279 mv "${CONFIG}.new.tmp" "${CONFIG}.new" 306 mv "${CONFIG}.new.tmp" "${CONFIG}.new"
@@ -378,6 +405,7 @@ while test true;do
378 CONFIG_PART_TYPE="${DEFAULT_PART_TYPE}" 405 CONFIG_PART_TYPE="${DEFAULT_PART_TYPE}"
379 CONFIG_PART_SIZE="${DEFAULT_PART_SIZE}" 406 CONFIG_PART_SIZE="${DEFAULT_PART_SIZE}"
380 CONFIG_IMG_SIZE="${DEFAULT_IMG_SIZE}" 407 CONFIG_IMG_SIZE="${DEFAULT_IMG_SIZE}"
408 CONFIG_RUN_ISOHYBRID="${DEFAULT_RUN_ISOHYBRID}"
381 CONFIG_TLS_CHECK="${DEFAULT_TLS_CHECK}" 409 CONFIG_TLS_CHECK="${DEFAULT_TLS_CHECK}"
382 cat /dev/null > ${CONFIG}.new 410 cat /dev/null > ${CONFIG}.new
383 dialog \ 411 dialog \