diff options
| author | David M. Syzdek <david@syzdek.net> | 2018-05-07 13:17:58 -0800 |
|---|---|---|
| committer | David M. Syzdek <david@syzdek.net> | 2018-05-07 13:21:43 -0800 |
| commit | 236538fb3d95ce2c2d9b6fdda9abcaac2f585df4 (patch) | |
| tree | ccaa7e111c56872e29b0de64f6a56fcc3cee13ef | |
| parent | 630661ed22d074fb35cd1bf42e827b185978cb2b (diff) | |
| download | iperd-236538fb3d95ce2c2d9b6fdda9abcaac2f585df4.tar.gz iperd-236538fb3d95ce2c2d9b6fdda9abcaac2f585df4.tar.bz2 iperd-236538fb3d95ce2c2d9b6fdda9abcaac2f585df4.tar.xz iperd-236538fb3d95ce2c2d9b6fdda9abcaac2f585df4.zip | |
Adding support for isohybrid
| -rw-r--r-- | Makefile | 3 | ||||
| -rw-r--r-- | src/scripts/configure.sh | 30 | ||||
| -rwxr-xr-x | src/scripts/genfiles.sh | 1 | ||||
| -rw-r--r-- | src/scripts/iperd.profile | 2 |
4 files changed, 35 insertions, 1 deletions
| @@ -205,6 +205,7 @@ images/iperdboot.iso: $(UEFI_FILES) | |||
| 205 | -V "IPEngRescueDisk" \ | 205 | -V "IPEngRescueDisk" \ |
| 206 | -A "IP Engineering Rescue Disk" \ | 206 | -A "IP Engineering Rescue Disk" \ |
| 207 | ./ | 207 | ./ |
| 208 | @if test "x$(RUN_ISOHYBRID)" == "xyes";then isohybrid -u "$(@)"; fi | ||
| 208 | @touch "$(@)" | 209 | @touch "$(@)" |
| 209 | 210 | ||
| 210 | 211 | ||
| @@ -226,6 +227,7 @@ images/iperdboot.bios.iso: $(BIOS_FILES) | |||
| 226 | -V "IPEngRescueDisk" \ | 227 | -V "IPEngRescueDisk" \ |
| 227 | -A "IP Engineering Rescue Disk" \ | 228 | -A "IP Engineering Rescue Disk" \ |
| 228 | ./ | 229 | ./ |
| 230 | @if test "x$(RUN_ISOHYBRID)" == "xyes";then isohybrid "$(@)"; fi | ||
| 229 | @touch "$(@)" | 231 | @touch "$(@)" |
| 230 | 232 | ||
| 231 | 233 | ||
| @@ -245,6 +247,7 @@ images/iperdboot.uefi.iso: $(UEFI_FILES) | |||
| 245 | -V "IPEngRescueDisk" \ | 247 | -V "IPEngRescueDisk" \ |
| 246 | -A "IP Engineering Rescue Disk" \ | 248 | -A "IP Engineering Rescue Disk" \ |
| 247 | ./ | 249 | ./ |
| 250 | @if test "x$(RUN_ISOHYBRID)" == "xyes";then isohybrid -u "$(@)"; fi | ||
| 248 | @touch "$(@)" | 251 | @touch "$(@)" |
| 249 | 252 | ||
| 250 | 253 | ||
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() | |||
| 263 | configure_save() | 289 | configure_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 \ |
diff --git a/src/scripts/genfiles.sh b/src/scripts/genfiles.sh index f9cdecf..f5fab86 100755 --- a/src/scripts/genfiles.sh +++ b/src/scripts/genfiles.sh | |||
| @@ -95,6 +95,7 @@ generate_makefile_config() | |||
| 95 | echo "DISKTYPE ?= ${CONFIG_PART_TYPE}" | 95 | echo "DISKTYPE ?= ${CONFIG_PART_TYPE}" |
| 96 | echo "PARTSIZE ?= ${CONFIG_PART_SIZE}" | 96 | echo "PARTSIZE ?= ${CONFIG_PART_SIZE}" |
| 97 | echo "TLSCHECK ?= ${CONFIG_TLS_CHECK}" | 97 | echo "TLSCHECK ?= ${CONFIG_TLS_CHECK}" |
| 98 | echo "RUN_ISOHYBRID ?= ${CONFIG_RUN_ISOHYBRID}" | ||
| 98 | 99 | ||
| 99 | # define standard dependencies | 100 | # define standard dependencies |
| 100 | STD_DEP_FILES="src/scripts/genfiles.sh" | 101 | STD_DEP_FILES="src/scripts/genfiles.sh" |
diff --git a/src/scripts/iperd.profile b/src/scripts/iperd.profile index 7d768a9..7482863 100644 --- a/src/scripts/iperd.profile +++ b/src/scripts/iperd.profile | |||
| @@ -52,10 +52,12 @@ DEFAULT_PART_TYPE="hybrid" | |||
| 52 | DEFAULT_PART_SIZE="0" | 52 | DEFAULT_PART_SIZE="0" |
| 53 | DEFAULT_IMG_SIZE="1900" | 53 | DEFAULT_IMG_SIZE="1900" |
| 54 | DEFAULT_TLS_CHECK="yes" | 54 | DEFAULT_TLS_CHECK="yes" |
| 55 | DEFAULT_RUN_ISOHYBRID="no" | ||
| 55 | CONFIG_PART_TYPE="${CONFIG_PART_TYPE:-${DEFAULT_PART_TYPE}}" | 56 | CONFIG_PART_TYPE="${CONFIG_PART_TYPE:-${DEFAULT_PART_TYPE}}" |
| 56 | CONFIG_PART_SIZE="${CONFIG_PART_SIZE:-${DEFAULT_PART_SIZE}}" | 57 | CONFIG_PART_SIZE="${CONFIG_PART_SIZE:-${DEFAULT_PART_SIZE}}" |
| 57 | CONFIG_IMG_SIZE="${CONFIG_IMG_SIZE:-${DEFAULT_IMG_SIZE}}" | 58 | CONFIG_IMG_SIZE="${CONFIG_IMG_SIZE:-${DEFAULT_IMG_SIZE}}" |
| 58 | CONFIG_TLS_CHECK="${CONFIG_TLS_CHECK:-${DEFAULT_TLS_CHECK}}" | 59 | CONFIG_TLS_CHECK="${CONFIG_TLS_CHECK:-${DEFAULT_TLS_CHECK}}" |
| 60 | CONFIG_RUN_ISOHYBRID="${CONFIG_RUN_ISOHYBRID:-${DEFAULT_RUN_ISOHYBRID}}" | ||
| 59 | 61 | ||
| 60 | 62 | ||
| 61 | # set exit codes to trigger specific xargs exit codes | 63 | # set exit codes to trigger specific xargs exit codes |
