Index: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/WriteInstallerLog.sh =================================================================== --- branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/WriteInstallerLog.sh (revision 0) +++ branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/WriteInstallerLog.sh (revision 236) @@ -0,0 +1,25 @@ +#!/bin/bash + +#echo "===============================================" +#echo "Write Installer Log" +#echo "*******************" +#echo "" +#echo "" + +# Receives two parameters +# $1 = selected volume for location of the install log +# $2 = text to write to the installer log + +if [ "$#" -eq 2 ]; then + logLocation="$1" + verboseText="$2" + #echo "DEBUG: passed argument = $logLocation" + #echo "DEBUG: passed argument = $verboseText" +fi + +echo "${verboseText}" >> ${logLocation}/Chameleon_Error_Log.txt + + +#echo "-----------------------------------------------" +#echo "" +exit 0 \ No newline at end of file Property changes on: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/WriteInstallerLog.sh ___________________________________________________________________ Added: svn:executable + * Index: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckProceed.sh =================================================================== --- branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckProceed.sh (revision 235) +++ branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckProceed.sh (revision 236) @@ -4,7 +4,7 @@ echo "Check Proceed - Can the script continue?" echo "******************************************" -# Receives Target Disk and Target Device +# Receives targetVolume and targetDevice # Checks the selected volume is present and the disk # is partitioned. Index: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/MainStandardPostinstall.sh =================================================================== --- branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/MainStandardPostinstall.sh (revision 235) +++ branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/MainStandardPostinstall.sh (revision 236) @@ -31,48 +31,49 @@ # Initialise Script Globals -stage0Loader="boot0" #diskloader -stage0LoaderDualBoot="boot0hfs" #was stage0Loaderdualboot -stage1LoaderHFS="boot1h" #was stage1LoaderHFS -stage1LoaderFAT="boot1f32" #was partitionloaderfat -stage2Loader="boot" #was filesystemloader +stage0Loader="boot0" +stage0LoaderDualBoot="boot0hfs" +stage1LoaderHFS="boot1h" +stage1LoaderFAT="boot1f32" +stage2Loader="boot" targetVolume=$3 #was bootvolume -targetDevice=$( df "${targetVolume}" | sed -n '2p' | awk '{print $1}' ) #was bootdev -targetDeviceRaw=${targetDevice/disk/rdisk} #was bootrdev -targetDisk=${targetDevice%s*} #was bootdisk -targetDiskRaw=${targetDisk/disk/rdisk} #was bootrdisk -targetSlice=${targetDevice#*disk*s} #was bootslice -targetResources="${targetVolume%/*}" #was bootresources - is this needed? +targetDevice=$( df "${targetVolume}" | sed -n '2p' | awk '{print $1}' ) +targetDeviceRaw=${targetDevice/disk/rdisk} +targetDisk=${targetDevice%s*} +targetDiskRaw=${targetDisk/disk/rdisk} +targetSlice=${targetDevice#*disk*s} +targetResources="${targetVolume%/*}" # is this needed? -echo "===============================================" -echo "DEBUG: display script variables" -echo "***************************" -echo "DEBUG: stage0Loader: Disk loader is ${stage0Loader}" -echo "DEBUG: stage0LoaderDualBoot: Disk loader is ${stage0LoaderDualBoot}" -echo "DEBUG: stage1LoaderHFS: Partition loader is ${stage1LoaderHFS}" -echo "DEBUG: stage1LoaderFat: Partition loader is ${stage1LoaderFAT}" -echo "DEBUG: stage2Loader: Filesystem loader is ${stage2Loader}" -echo "DEBUG: targetVolume: Volume is ${targetVolume}" -echo "DEBUG: targetDevice: Volume device is ${targetDevice}" -echo "DEBUG: targetDeviceRaw: Volume raw device is ${targetDeviceRaw}" -echo "DEBUG: targetDisk: Disk device is ${targetDisk}" -echo "DEBUG: targetDiskRaw: Disk raw device is ${targetDiskRaw}" -echo "DEBUG: targetSlice: Volume slice is ${targetSlice}" -echo "DEBUG: targetResources: Boot Resources is ${targetResources}" -echo "-----------------------------------------------" -echo "" +#echo "===============================================" +#echo "DEBUG: display script variables" +#echo "*******************************" +#echo "DEBUG: stage0Loader: Disk loader is ${stage0Loader}" +#echo "DEBUG: stage0LoaderDualBoot: Disk loader is ${stage0LoaderDualBoot}" +#echo "DEBUG: stage1LoaderHFS: Partition loader is ${stage1LoaderHFS}" +#echo "DEBUG: stage1LoaderFat: Partition loader is ${stage1LoaderFAT}" +#echo "DEBUG: stage2Loader: Filesystem loader is ${stage2Loader}" +#echo "DEBUG: targetVolume: Volume is ${targetVolume}" +#echo "DEBUG: targetDevice: Volume device is ${targetDevice}" +#echo "DEBUG: targetDeviceRaw: Volume raw device is ${targetDeviceRaw}" +#echo "DEBUG: targetDisk: Disk device is ${targetDisk}" +#echo "DEBUG: targetDiskRaw: Disk raw device is ${targetDiskRaw}" +#echo "DEBUG: targetSlice: Volume slice is ${targetSlice}" +#echo "DEBUG: targetResources: Boot Resources is ${targetResources}" +#echo "-----------------------------------------------" +#echo "" + # Double check we can see the selected partition and it's of the right type # if not the following script returns to indicate failure. "$scriptDir"CheckProceed.sh "${targetVolume}" "${targetDevice}" returnValue=$? -if [ ${returnValue} = 0 ]; then +if [ ${returnValue}=0 ]; then # OK to proceed @@ -137,6 +138,8 @@ if [ ${fatType} = 1 ] && [ ${partitionTable} = 3 ]; then echo "ERROR: - Can't install to a device using FAT16" + # Write error to Chameleon_Error_Log file + "$scriptDir"WriteInstallerLog.sh "${3}" "${3} is a FAT16 device - Chameleon boot files not written" else # Continue if the selected device is not a FAT16 format device @@ -154,8 +157,13 @@ # Set the active partition ONLY if Windows is not installed "$scriptDir"SetActivePartition.sh "${espformat}" "${diskSigCheck}" "${targetDiskRaw}" "${targetSlice}" "${targetVolume}" fi - + else + # Write error to Chameleon_Error_Log file + "$scriptDir"WriteInstallerLog.sh "${targetVolume}" "Error: Target drive has existing GRUB / Linux loader in the MBR - Not sure how to continue" fi +else + # Write error to Chameleon_Error_Log file + "$scriptDir"WriteInstallerLog.sh "${targetVolume}" "Error: ${targetVolume} couldn't be found or the disk doesn't use slices" fi exit 0