Chameleon

Chameleon Commit Details

Date:2011-12-24 23:46:33 (12 years 3 months ago)
Author:blackosx
Commit:1749
Parents: 1748
Message:Couple of tweaks to make the installation log more comprehensive.
Changes:
M/branches/blackosx/package/Scripts/Main/ESPpostinstall
M/branches/blackosx/package/Scripts/Sub/CheckPreviousChameleon.sh
M/branches/blackosx/package/Scripts/Sub/MountESP.sh
M/branches/blackosx/package/Scripts/Main/Standardpostinstall

File differences

branches/blackosx/package/Scripts/Main/ESPpostinstall
170170
171171
172172
173
173
174174
175175
176176
# Check for another existing Chameleon installation on the same disk
"$scriptDir"InstallLog.sh "${targetVolume}" "LineBreak"
"$scriptDir"InstallLog.sh "${targetVolume}" "About to check target disk for previous installations."
"$scriptDir"InstallLog.sh "${targetVolume}" "Preparing to check target disk for previous installations."
"$scriptDir"CheckPreviousChameleon.sh "${targetDisk}" "${targetDeviceRaw}" "${targetDevice}" "${targetVolumeChosenByUser}" "${scriptDir}"
fi
branches/blackosx/package/Scripts/Main/Standardpostinstall
170170
171171
172172
173
173
174174
175175
176176
# Next we look to check for existing Chameleon installations.
"$scriptDir"InstallLog.sh "${targetVolume}" "LineBreak"
"$scriptDir"InstallLog.sh "${targetVolume}" "About to check target disk for previous installations."
"$scriptDir"InstallLog.sh "${targetVolume}" "Preparing to check target disk for previous installations."
if [ ${efiPartitionExist} -ne 0 ]; then # volume has an EFI system partition
"$scriptDir"InstallLog.sh "${targetVolume}" "Going to check the EFI system partition also."
# Unmount ALL mounted volumes named EFI. Returns 0=success, 1=fail
branches/blackosx/package/Scripts/Sub/CheckPreviousChameleon.sh
5252
5353
5454
55
56
55
5756
5857
5958
......
6463
6564
6665
66
6767
6868
6969
......
108108
109109
110110
111
111
112112
113113
114114
......
173173
174174
175175
176
177
176178
177
178179
180
181
182
179183
180184
181185
# if there is more than one partition on the disk.
# ===============================================
if [ $numSlices -gt 1 ]; then
"$scriptDir"InstallLog.sh "${installerVolume}" "LineBreak"
"$scriptDir"InstallLog.sh "${installerVolume}" "Checking for previous chameleon installations on ${targetDisk#/dev/}"
"$scriptDir"InstallLog.sh "${installerVolume}" "Checking ${targetDisk#/dev/}."
# Check the disk's MBR for existing stage 0 boot code (code from CheckDiskMicrocode.sh script)
stage0type=$( dd 2>/dev/null if="$targetDisk" count=3 bs=1 skip=105 | xxd | awk '{print $2$3}' )
fi
#Scan all partitions for Chameleon code
cleanRun=1
for (( i=1; i <= $numSlices; i++ ));
do
if [ $stage0type == 1 ] || [ $stage0type == 2 ]; then
"$scriptDir"InstallLog.sh "${installerVolume}" "${message}"
fi
if [ $stagesFound == 3 ] && [ $i -gt $sliceNumber ]; then
# Exisitng installation found which will no longer be default.
# Existing installation found which will no longer be default.
message="NOTE: There is an existing Chameleon installation on $targetDiskRaw
NOTE: but this installation on $targetDevice will be the default loader
NOTE: because you're installing to an earlier partition on the disk."
#echo "DEBUG: Boot0 not found"
fi
fi
else
(( cleanRun++ ))
fi
done
if [[ $cleanRun == $i ]]; then
"$scriptDir"InstallLog.sh "${installerVolume}" "Nothing found that could cause any problems."
fi
else
"$scriptDir"InstallLog.sh "${installerVolume}" "Nothing to check as there's only one partition."
fi
branches/blackosx/package/Scripts/Sub/MountESP.sh
3737
3838
3939
40
40
4141
4242
4343
44
44
4545
4646
4747
# Mount '/Volumes/EFI' using the correct format type
if [ "$( fstyp "${targetDisk}"s1 | grep hfs )" ]; then
"$scriptDir"InstallLog.sh "${installerVolume}" "Mounting ${targetDisk}s1 as /Volumes/EFI"
"$scriptDir"InstallLog.sh "${installerVolume}" "Mounting ${targetDisk}s1 as /Volumes/EFI."
mount_hfs "${targetDisk}"s1 "/Volumes/EFI"
fi
if [ "$( fstyp "${targetDisk}"s1 | grep msdos )" ]; then
"$scriptDir"InstallLog.sh "${installerVolume}" "Mounting ${targetDisk}s1 as /Volumes/EFI"
"$scriptDir"InstallLog.sh "${installerVolume}" "Mounting ${targetDisk}s1 as /Volumes/EFI."
mount_msdos -u 0 -g 0 "${targetDisk}"s1 "/Volumes/EFI"
fi
else

Archive Download the corresponding diff file

Revision: 1749