diff options
| author | David M. Syzdek <david@syzdek.net> | 2018-05-07 11:50:39 -0800 |
|---|---|---|
| committer | David M. Syzdek <david@syzdek.net> | 2018-05-07 11:50:39 -0800 |
| commit | 41192052270091b58eab1e58a941cd483957855a (patch) | |
| tree | d7ddf41a9ed1188c463ffd8b348537a085e0e951 /src/scripts/configure.sh | |
| parent | cb5cbaf11cff6f7b31e1ea826c429de88eda1c23 (diff) | |
| download | iperd-41192052270091b58eab1e58a941cd483957855a.tar.gz iperd-41192052270091b58eab1e58a941cd483957855a.tar.bz2 iperd-41192052270091b58eab1e58a941cd483957855a.tar.xz iperd-41192052270091b58eab1e58a941cd483957855a.zip | |
Updating options to include ability to disable SSL checks
Diffstat (limited to 'src/scripts/configure.sh')
| -rw-r--r-- | src/scripts/configure.sh | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/src/scripts/configure.sh b/src/scripts/configure.sh index ef74822..3c3914c 100644 --- a/src/scripts/configure.sh +++ b/src/scripts/configure.sh | |||
| @@ -100,7 +100,7 @@ configure_disk() | |||
| 100 | # display main menu | 100 | # display main menu |
| 101 | exec 3>&1 | 101 | exec 3>&1 |
| 102 | RESULT="$(echo "" | xargs dialog \ | 102 | RESULT="$(echo "" | xargs dialog \ |
| 103 | --title " Disk Options " \ | 103 | --title " Miscellaneous Options " \ |
| 104 | --backtitle "IP Engineering Rescue Disk Setup" \ | 104 | --backtitle "IP Engineering Rescue Disk Setup" \ |
| 105 | --ok-label "Change" \ | 105 | --ok-label "Change" \ |
| 106 | --cancel-label "Back" \ | 106 | --cancel-label "Back" \ |
| @@ -109,6 +109,7 @@ configure_disk() | |||
| 109 | "usb" "USB partition type (${CONFIG_PART_TYPE})" \ | 109 | "usb" "USB partition type (${CONFIG_PART_TYPE})" \ |
| 110 | "size" "USB disk image size (${CONFIG_IMG_SIZE} MB)" \ | 110 | "size" "USB disk image size (${CONFIG_IMG_SIZE} MB)" \ |
| 111 | "iso" "ISO partition type (${CONFIG_ISO_TYPE})" \ | 111 | "iso" "ISO partition type (${CONFIG_ISO_TYPE})" \ |
| 112 | "tls" "TLS Certificate check (${CONFIG_TLS_CHECK})" \ | ||
| 112 | 2>&1 1>&3)" | 113 | 2>&1 1>&3)" |
| 113 | RC=$? | 114 | RC=$? |
| 114 | exec 3>&- | 115 | exec 3>&- |
| @@ -177,6 +178,21 @@ configure_disk() | |||
| 177 | RC=$? | 178 | RC=$? |
| 178 | exec 3>&- | 179 | exec 3>&- |
| 179 | CONFIG_ISO_TYPE="${RESULT}" | 180 | CONFIG_ISO_TYPE="${RESULT}" |
| 181 | elif test $RC -eq 0 && test "x${RESULT}" == "xtls";then | ||
| 182 | exec 3>&1 | ||
| 183 | RESULT="$(echo "" | xargs dialog \ | ||
| 184 | --title " TLS Certificate Checks " \ | ||
| 185 | --backtitle "IP Engineering Rescue Disk Setup" \ | ||
| 186 | --yesno "\nEnable TLS certificate checks when downloading files?" \ | ||
| 187 | 7 70 \ | ||
| 188 | 2>&1 1>&3)" | ||
| 189 | RC=$? | ||
| 190 | exec 3>&- | ||
| 191 | if test $RC -eq 0;then | ||
| 192 | CONFIG_TLS_CHECK=yes | ||
| 193 | else | ||
| 194 | CONFIG_TLS_CHECK=no | ||
| 195 | fi | ||
| 180 | fi | 196 | fi |
| 181 | done | 197 | done |
| 182 | } | 198 | } |
| @@ -270,7 +286,7 @@ configure_distros_image() | |||
| 270 | configure_save() | 286 | configure_save() |
| 271 | { | 287 | { |
| 272 | # save variables | 288 | # save variables |
| 273 | for STR in "CONFIG_PART_TYPE" "CONFIG_IMG_SIZE" "CONFIG_ISO_TYPE";do | 289 | for STR in "CONFIG_PART_TYPE" "CONFIG_IMG_SIZE" "CONFIG_ISO_TYPE" "CONFIG_TLS_CHECK";do |
| 274 | egrep "^${STR}=" "${CONFIG}.new" > /dev/null | 290 | egrep "^${STR}=" "${CONFIG}.new" > /dev/null |
| 275 | if test $? -ne 0;then | 291 | if test $? -ne 0;then |
| 276 | echo "${STR}=" >> "${CONFIG}.new" | 292 | echo "${STR}=" >> "${CONFIG}.new" |
| @@ -281,6 +297,7 @@ configure_save() | |||
| 281 | -e "s/^CONFIG_IMG_SIZE=.*$/CONFIG_IMG_SIZE=${CONFIG_IMG_SIZE}/g" \ | 297 | -e "s/^CONFIG_IMG_SIZE=.*$/CONFIG_IMG_SIZE=${CONFIG_IMG_SIZE}/g" \ |
| 282 | -e "s/^CONFIG_PART_TYPE=.*$/CONFIG_PART_TYPE=${CONFIG_PART_TYPE}/g" \ | 298 | -e "s/^CONFIG_PART_TYPE=.*$/CONFIG_PART_TYPE=${CONFIG_PART_TYPE}/g" \ |
| 283 | -e "s/^CONFIG_PART_SIZE=.*$/CONFIG_PART_SIZE=${CONFIG_PART_SIZE}/g" \ | 299 | -e "s/^CONFIG_PART_SIZE=.*$/CONFIG_PART_SIZE=${CONFIG_PART_SIZE}/g" \ |
| 300 | -e "s/^CONFIG_TLS_CHECK=.*$/CONFIG_TLS_CHECK=${CONFIG_TLS_CHECK}/g" \ | ||
| 284 | "${CONFIG}.new" \ | 301 | "${CONFIG}.new" \ |
| 285 | > "${CONFIG}.new.tmp" | 302 | > "${CONFIG}.new.tmp" |
| 286 | mv "${CONFIG}.new.tmp" "${CONFIG}.new" | 303 | mv "${CONFIG}.new.tmp" "${CONFIG}.new" |
| @@ -352,7 +369,7 @@ while test true;do | |||
| 352 | --cancel-label "Exit" \ | 369 | --cancel-label "Exit" \ |
| 353 | --menu "Select item to configure:" \ | 370 | --menu "Select item to configure:" \ |
| 354 | 20 70 13 \ | 371 | 20 70 13 \ |
| 355 | "disk" "Change disk image options" \ | 372 | "options" "Change miscellaneous options" \ |
| 356 | "images" "Select individual boot images" \ | 373 | "images" "Select individual boot images" \ |
| 357 | "all" "Select all available images" \ | 374 | "all" "Select all available images" \ |
| 358 | "defaults" "Load defaults" \ | 375 | "defaults" "Load defaults" \ |
| @@ -375,7 +392,7 @@ while test true;do | |||
| 375 | elif test $RC -eq 126;then # (save) | 392 | elif test $RC -eq 126;then # (save) |
| 376 | configure_save | 393 | configure_save |
| 377 | exit 0 | 394 | exit 0 |
| 378 | elif test $RC -eq 0 && test "x${RESULT}" == "xdisk";then | 395 | elif test $RC -eq 0 && test "x${RESULT}" == "xoptions";then |
| 379 | configure_disk | 396 | configure_disk |
| 380 | elif test $RC -eq 0 && test "x${RESULT}" == "ximages";then | 397 | elif test $RC -eq 0 && test "x${RESULT}" == "ximages";then |
| 381 | configure_distros | 398 | configure_distros |
| @@ -385,7 +402,8 @@ while test true;do | |||
| 385 | CONFIG_PART_TYPE="${DEFAULT_PART_TYPE}" | 402 | CONFIG_PART_TYPE="${DEFAULT_PART_TYPE}" |
| 386 | CONFIG_PART_SIZE="${DEFAULT_PART_SIZE}" | 403 | CONFIG_PART_SIZE="${DEFAULT_PART_SIZE}" |
| 387 | CONFIG_IMG_SIZE="${DEFAULT_IMG_SIZE}" | 404 | CONFIG_IMG_SIZE="${DEFAULT_IMG_SIZE}" |
| 388 | CONFIG_ISO_TYPE="${DEFAULT_ISO_SIZE}" | 405 | CONFIG_ISO_TYPE="${DEFAULT_ISO_TYPE}" |
| 406 | CONFIG_TLS_CHECK="${DEFAULT_TLS_CHECK}" | ||
| 389 | cat /dev/null > ${CONFIG}.new | 407 | cat /dev/null > ${CONFIG}.new |
| 390 | dialog \ | 408 | dialog \ |
| 391 | --backtitle "IP Engineering Rescue Disk Setup" \ | 409 | --backtitle "IP Engineering Rescue Disk Setup" \ |
