Index: branches/blackosx/package/Scripts/Standard/postinstall =================================================================== --- branches/blackosx/package/Scripts/Standard/postinstall (revision 1547) +++ branches/blackosx/package/Scripts/Standard/postinstall (revision 1548) @@ -46,7 +46,6 @@ targetSlice=${targetDevice#*disk*s} - echo "===============================================" echo "DEBUG: display script variables" echo "*******************************" @@ -67,7 +66,11 @@ echo "" +# Write some information to the Install Log +"$scriptDir"InstallLog.sh "${targetVolume}" "Running Standard postinstall script +Target volume = ${targetVolume}" + # Double check we can see the selected partition and it's of the right type # if not the following script returns to indicate failure. Index: branches/blackosx/package/Scripts/EFI/postinstall =================================================================== --- branches/blackosx/package/Scripts/EFI/postinstall (revision 1547) +++ branches/blackosx/package/Scripts/EFI/postinstall (revision 1548) @@ -69,6 +69,12 @@ echo "" +# Write some information to the Install Log +"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Running EFI postinstall script +Target volume Selected by user = ${targetVolumeChosenByUser} +Target volume = ${targetVolume}" + + # Check to see if the selected disk uses a GPT bootuuid=$( diskutil info "$targetDeviceChosenByUser" | grep Volume\ UUID | awk {'print $3'} ) Index: branches/blackosx/package/Scripts/Post/postinstall =================================================================== --- branches/blackosx/package/Scripts/Post/postinstall (revision 1547) +++ branches/blackosx/package/Scripts/Post/postinstall (revision 1548) @@ -44,12 +44,15 @@ attempts=$(( ${attempts} + 1 )) done -# Remove /.ChameleonEFI file -rm "$dest_vol"/.ChameleonEFI + # Remove /.ChameleonEFI file + rm "$dest_vol"/.ChameleonEFI +fi +# Remove /.ChameleonLogFlag file +if [ -f "$dest_vol"/.ChameleonLogFlag ]; then + rm "$dest_vol"/.ChameleonLogFlag fi - # delete the temporary Chameleon folder rm -rf "$dest_vol/tmpcham" Index: branches/blackosx/package/Scripts/Install/InstallLog.sh =================================================================== --- branches/blackosx/package/Scripts/Install/InstallLog.sh (revision 1547) +++ branches/blackosx/package/Scripts/Install/InstallLog.sh (revision 1548) @@ -26,10 +26,29 @@ logName="Chameleon_Installer_Log.txt" logFile="${logLocation}"/$logName -if [ -f "${logFile}" ]; then +# On first run, create a file named .ChameleonLogFlag at +# the root of the target volume. Then check for this file +# on subsequent runs to know the initialisation sequence +# has been done. + +if [ ! -f "${logLocation}"/.ChameleonLogFlag ]; then + # This is the first run, so setup + # Chameleon_Installer_Log.txt file + # by writing header. + + echo "Chameleon installer log - "$( date ) >"${logFile}" + echo "------------------------------------------------------" >>"${logFile}" + diskutil list >>"${logFile}" + echo "------------------------------------------------------" >>"${logFile}" + + # Write first message that this script was called with. echo "${verboseText}" >> "${logFile}" + + # Create /.ChameleonLogFlag file. + echo "Log" >"${logLocation}"/.ChameleonLogFlag else - echo "${verboseText}" > "${logFile}" + # Append messages to the log as passed by other scripts. + echo "${verboseText}" >> "${logFile}" fi exit 0 \ No newline at end of file Index: branches/blackosx/package/Scripts/Install/CheckFatType.sh =================================================================== --- branches/blackosx/package/Scripts/Install/CheckFatType.sh (revision 1547) +++ branches/blackosx/package/Scripts/Install/CheckFatType.sh (revision 1548) @@ -26,29 +26,40 @@ partitionBootSector=$( dd 2>/dev/null if="$targetDeviceRaw" count=1 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' ) if [ "${partitionBootSector:36:2}" == "00" ] && [ "${partitionBootSector:42:2}" == "f8" ] && [ "${partitionBootSector:48:2}" == "3f" ]; then echo "Found a FAT32 device formatted by Windows Explorer" - echo "-----------------------------------------------" + echo "--------------------------------------------------" echo "" exit 2 fi if [ "${partitionBootSector:36:2}" == "02" ] && [ "${partitionBootSector:42:2}" == "f8" ] && [ "${partitionBootSector:48:2}" == "3f" ]; then echo "Found a FAT16 device formatted by Windows Explorer" - echo "-----------------------------------------------" + echo "--------------------------------------------------" echo "" exit 1 fi if [ "${partitionBootSector:36:2}" == "00" ] && [ "${partitionBootSector:42:2}" == "f0" ] && [ "${partitionBootSector:48:2}" == "20" ]; then - echo "Found a FAT32 device formatted by OSX Disk Utility" - echo "-----------------------------------------------" + echo "Found a FAT32 device formatted by OS X Snow Leopard Disk Utility" + echo "----------------------------------------------------------------" echo "" exit 2 fi if [ "${partitionBootSector:36:2}" == "02" ] && [ "${partitionBootSector:42:2}" == "f0" ] && [ "${partitionBootSector:48:2}" == "20" ]; then - echo "Found a FAT16 device formatted by OSX Disk Utility" - echo "-----------------------------------------------" + echo "Found a FAT16 device formatted by OS X Snow Leopard Disk Utility" + echo "----------------------------------------------------------------" echo "" exit 1 fi - +if [ "${partitionBootSector:36:2}" == "00" ] && [ "${partitionBootSector:42:2}" == "f8" ] && [ "${partitionBootSector:48:2}" == "20" ]; then + echo "Found a FAT32 device formatted by OS X Lion Disk Utility" + echo "--------------------------------------------------------" + echo "" + exit 2 +fi +if [ "${partitionBootSector:36:2}" == "02" ] && [ "${partitionBootSector:42:2}" == "f8" ] && [ "${partitionBootSector:48:2}" == "20" ]; then + echo "Found a FAT16 device formatted by OS X Lion Disk Utility" + echo "--------------------------------------------------------" + echo "" + exit 1 +fi echo "-----------------------------------------------" echo "" exit 0 \ No newline at end of file Index: branches/blackosx/package/Scripts/Install/CheckProceed.sh =================================================================== --- branches/blackosx/package/Scripts/Install/CheckProceed.sh (revision 1547) +++ branches/blackosx/package/Scripts/Install/CheckProceed.sh (revision 1548) @@ -56,4 +56,6 @@ echo "-----------------------------------------------" echo "" +"$scriptDir"InstallLog.sh "${installerVolume}" "CheckProceed: PASS" + exit 0 \ No newline at end of file