better error handling; made "declare kscd" global again
This commit is contained in:
@@ -538,8 +538,9 @@ echo ""
|
|||||||
echo "Creating VirtualBox 6 virtual ISO containing the"
|
echo "Creating VirtualBox 6 virtual ISO containing the"
|
||||||
echo "installation files from swcdn.apple.com"
|
echo "installation files from swcdn.apple.com"
|
||||||
echo ""
|
echo ""
|
||||||
|
pseudouuid="$(od -tx -N16 /dev/urandom | xxd -r | xxd -p)"
|
||||||
echo "--iprt-iso-maker-file-marker-bourne-sh 57c0ec7d-2112-4c24-a93f-32e6f08702b9
|
pseudouuid="${pseudouuid:0:8}-${pseudouuid:8:4}-${pseudouuid:12:4}-${pseudouuid:16:4}-${pseudouuid:20:12}"
|
||||||
|
echo "--iprt-iso-maker-file-marker-bourne-sh "${pseudouuid}"
|
||||||
--volume-id=${macOS_release_name:0:5}-files" > "${macOS_release_name}_Installation_files.viso"
|
--volume-id=${macOS_release_name:0:5}-files" > "${macOS_release_name}_Installation_files.viso"
|
||||||
|
|
||||||
# Apple macOS installation files
|
# Apple macOS installation files
|
||||||
@@ -677,8 +678,8 @@ function populate_virtual_disks() {
|
|||||||
print_dimly "stage: populate_virtual_disks"
|
print_dimly "stage: populate_virtual_disks"
|
||||||
# Attach virtual disk images of the base system, installation, and target
|
# Attach virtual disk images of the base system, installation, and target
|
||||||
# to the virtual machine
|
# to the virtual machine
|
||||||
|
VBoxManage storagectl macOS --remove --name SATA >/dev/null 2>&1
|
||||||
if [[ -n $(
|
if [[ -n $(
|
||||||
2>&1 VBoxManage storagectl macOS --remove --name SATA >/dev/null
|
|
||||||
2>&1 VBoxManage storagectl "${vmname}" --add sata --name SATA --hostiocache on >/dev/null
|
2>&1 VBoxManage storagectl "${vmname}" --add sata --name SATA --hostiocache on >/dev/null
|
||||||
2>&1 VBoxManage storageattach "${vmname}" --storagectl SATA --port 0 \
|
2>&1 VBoxManage storageattach "${vmname}" --storagectl SATA --port 0 \
|
||||||
--type hdd --nonrotational on --medium "${vmname}.vdi" >/dev/null
|
--type hdd --nonrotational on --medium "${vmname}.vdi" >/dev/null
|
||||||
@@ -747,8 +748,8 @@ if [[ "$( VBoxManage list runningvms )" =~ ^\""${vmname}" ]]; then
|
|||||||
printf "${highlight_color}"'Please '"${warning_color}"'manually'"${highlight_color}"' shut down the virtual machine and press enter to continue.'"${default_color}"
|
printf "${highlight_color}"'Please '"${warning_color}"'manually'"${highlight_color}"' shut down the virtual machine and press enter to continue.'"${default_color}"
|
||||||
clear_input_buffer_then_read
|
clear_input_buffer_then_read
|
||||||
fi
|
fi
|
||||||
|
VBoxManage storagectl macOS --remove --name SATA >/dev/null 2>&1
|
||||||
if [[ -n $(
|
if [[ -n $(
|
||||||
2>&1 VBoxManage storagectl macOS --remove --name SATA >/dev/null
|
|
||||||
2>&1 VBoxManage storagectl "${vmname}" --add sata --name SATA --hostiocache on >/dev/null
|
2>&1 VBoxManage storagectl "${vmname}" --add sata --name SATA --hostiocache on >/dev/null
|
||||||
2>&1 VBoxManage storageattach "${vmname}" --storagectl SATA --port 0 \
|
2>&1 VBoxManage storageattach "${vmname}" --storagectl SATA --port 0 \
|
||||||
--type hdd --nonrotational on --medium "${vmname}.vdi" >/dev/null
|
--type hdd --nonrotational on --medium "${vmname}.vdi" >/dev/null
|
||||||
|
|||||||
Reference in New Issue
Block a user