Index: branches/blackosx/package/Scripts/Main/Standard/postinstall =================================================================== --- branches/blackosx/package/Scripts/Main/Standard/postinstall (revision 1641) +++ branches/blackosx/package/Scripts/Main/Standard/postinstall (revision 1642) @@ -67,10 +67,6 @@ # Write some information to the Install Log -versionNumber=`cat "${scriptDir}"/Resources/version` -revisionNumber=`cat "${scriptDir}"/Resources/revision` -"$scriptDir"InstallLog.sh "${targetVolume}" "Installer version: ${versionNumber} ${revisionNumber}" -"$scriptDir"InstallLog.sh "${targetVolume}" "Diskutil" "$scriptDir"InstallLog.sh "${targetVolume}" "Running Standard postinstall script" "$scriptDir"InstallLog.sh "${targetVolume}" "Target volume = ${targetVolume} on ${targetDevice}" Index: branches/blackosx/package/Scripts/Main/EFI/postinstall =================================================================== --- branches/blackosx/package/Scripts/Main/EFI/postinstall (revision 1641) +++ branches/blackosx/package/Scripts/Main/EFI/postinstall (revision 1642) @@ -71,15 +71,10 @@ # Write some information to the Install Log -versionNumber=`cat "${scriptDir}"/Resources/version` -revisionNumber=`cat "${scriptDir}"/Resources/revision` -"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Installer version: ${versionNumber} ${revisionNumber}" -"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Diskutil" "$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Running EFI postinstall script" "$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Target selected by user = ${targetVolumeChosenByUser} on ${targetDeviceChosenByUser}" "$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Target volume = ${targetVolume} on ${targetDevice}" - # 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/Main/Post/postinstall =================================================================== --- branches/blackosx/package/Scripts/Main/Post/postinstall (revision 1641) +++ branches/blackosx/package/Scripts/Main/Post/postinstall (revision 1642) @@ -224,20 +224,10 @@ rm "$dest_vol"/.ChameleonEFI fi -# Remove /.ChameleonLogFlag file -if [ -f "$dest_vol"/.ChameleonLogFlag ]; then - cleanUp="${cleanUp},4" +"$scriptDir"InstallLog.sh "${dest_vol}" "Cleanup: ${cleanUp}" +"$scriptDir"InstallLog.sh "${dest_vol}" "LineBreak" +"$scriptDir"InstallLog.sh "${dest_vol}" "Post script complete" - "$scriptDir"InstallLog.sh "${dest_vol}" "Cleanup: ${cleanUp}" - - # we have to add the final install log messages before - # deleting /.ChameleonLogFlag. - "$scriptDir"InstallLog.sh "${dest_vol}" "LineBreak" - "$scriptDir"InstallLog.sh "${dest_vol}" "Post script complete" - - rm "$dest_vol"/.ChameleonLogFlag -fi - echo "===============================================" echo "END - Post Post-Install Script" echo "*********************************" Index: branches/blackosx/package/Scripts/Main/preinstall =================================================================== --- branches/blackosx/package/Scripts/Main/preinstall (revision 1641) +++ branches/blackosx/package/Scripts/Main/preinstall (revision 1642) @@ -6,8 +6,42 @@ echo "-----------------------------------------------" echo "" -# Place holder for maybe setting up install log here? +# Creates text file named 'Chameleon_Installer_Log.txt' +# at the root of the target volume. This is to help show the +# user why the installation process failed (even though the +# package installer ends reading 'Installation Successful'. + + +# Find location of this script in the package installer +# so we know where all the other scripts are located. + +MYLOCATION="${PWD}/${BASH_ARGV[0]}" +export MYLOCATION="${MYLOCATION%/*}" +scriptDir=$MYLOCATION + +targetVolume=$3 + +logName="Chameleon_Installer_Log.txt" +logFile="${targetVolume}"/$logName + +versionNumber=`cat "${scriptDir}"/Resources/version` +revisionNumber=`cat "${scriptDir}"/Resources/revision` + + + +# Setup Chameleon_Installer_Log.txt file +# by writing header and diskutil list + +echo "Chameleon installer log - $( date ) +Installer version: ${versionNumber} ${revisionNumber} +======================================================" >"${logFile}" + +diskutil list >>"${logFile}" +echo "======================================================" >>"${logFile}" + + + echo "===============================================" echo "END - Pre-Install Script" echo "*********************************" Index: branches/blackosx/package/Scripts/Sub/InstallLog.sh =================================================================== --- branches/blackosx/package/Scripts/Sub/InstallLog.sh (revision 1641) +++ branches/blackosx/package/Scripts/Sub/InstallLog.sh (revision 1642) @@ -4,10 +4,8 @@ echo "InstallLog: Create/Append installation log" echo "**********************************************" -# Creates text file named 'Chameleon_Installer_Log.txt' -# at the root of the target volume. This is to help show the -# user why the installation process failed (even though the -# package installer ends reading 'Installation Successful'. +# Writes to the Chameleon_Installer_Log.txt file created +# by the preinstall script at the start of installation. # Receives two parameters # $1 = selected volume for location of the install log @@ -23,30 +21,14 @@ exit 9 fi + + logName="Chameleon_Installer_Log.txt" logFile="${logLocation}"/$logName -# 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. +if [ -f "${logFile}" ]; then - # Also include the first message that this script - # would be called with which will be version/revision - # of Chameleon package. - - echo "Chameleon installer log - $( date ) -${verboseText} -======================================================" >"${logFile}" - - # Create /.ChameleonLogFlag file. - echo "Log" >"${logLocation}"/.ChameleonLogFlag -else # Append messages to the log as passed by other scripts. if [ "${verboseText}" = "Diskutil" ]; then diskutil list >>"${logFile}" Index: branches/blackosx/package/buildpkg.sh =================================================================== --- branches/blackosx/package/buildpkg.sh (revision 1641) +++ branches/blackosx/package/buildpkg.sh (revision 1642) @@ -61,7 +61,10 @@ packagesidentity="org.chameleon" mkdir -p ${1}/Pre/Root mkdir -p ${1}/Pre/Scripts + ditto --noextattr --noqtn ${1%/*/*}/revision ${1}/Pre/Scripts/Resources/revision + ditto --noextattr --noqtn ${1%/*/*}/version ${1}/Pre/Scripts/Resources/version cp -f ${pkgroot}/Scripts/Main/preinstall ${1}/Pre/Scripts + cp -f ${pkgroot}/Scripts/Sub/InstallLog.sh ${1}/Pre/Scripts echo " [BUILD] Pre " buildpackage "${1}/Pre" "/" "" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1 # End build pre install package @@ -99,8 +102,6 @@ cp -f ${pkgroot}/Scripts/Main/Standard/* ${1}/Standard/Scripts cp -f ${pkgroot}/Scripts/Sub/* ${1}/Standard/Scripts ditto --arch i386 `which SetFile` ${1}/Standard/Scripts/Resources/SetFile - ditto --noextattr --noqtn ${1%/*/*}/revision ${1}/Standard/Scripts/Resources/revision - ditto --noextattr --noqtn ${1%/*/*}/version ${1}/Standard/Scripts/Resources/version echo " [BUILD] Standard " buildpackage "${1}/Standard" "/" "${coresize}" "start_enabled=\"true\" selected=\"exclusive(choices['EFI']) && exclusive(choices['noboot'])\"" >/dev/null 2>&1 # End build standard package @@ -111,8 +112,6 @@ cp -f ${pkgroot}/Scripts/Main/EFI/* ${1}/EFI/Scripts cp -f ${pkgroot}/Scripts/Sub/* ${1}/EFI/Scripts ditto --arch i386 `which SetFile` ${1}/EFI/Scripts/Resources/SetFile - ditto --noextattr --noqtn ${1%/*/*}/revision ${1}/EFI/Scripts/Resources/revision - ditto --noextattr --noqtn ${1%/*/*}/version ${1}/EFI/Scripts/Resources/version echo " [BUILD] EFI " buildpackage "${1}/EFI" "/" "${coresize}" "start_visible=\"systemHasGPT()\" selected=\"exclusive(choices['Standard']) && exclusive(choices['noboot'])\"" >/dev/null 2>&1 # End build efi package