Index: branches/blackosx/trunk/PackageBuilder/Build/Chameleon Installer v2.1.3b.pkg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/11postflight-contents.xml
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/11postflight-contents.xml (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/11postflight-contents.xml (revision 255)
@@ -1 +1 @@
-
\ No newline at end of file
+mode
\ No newline at end of file
Index: branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/10fdisk-contents.xml
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/10fdisk-contents.xml (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/10fdisk-contents.xml (revision 255)
@@ -1 +1 @@
-
\ No newline at end of file
+groupmodeowner
\ No newline at end of file
Index: branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/05boot-contents.xml
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/05boot-contents.xml (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/05boot-contents.xml (revision 255)
@@ -1 +1 @@
-
\ No newline at end of file
+groupmodeowner
\ No newline at end of file
Index: branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/09boot-contents.xml
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/09boot-contents.xml (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/09boot-contents.xml (revision 255)
@@ -1 +1 @@
-
\ No newline at end of file
+groupowner
\ No newline at end of file
Index: branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/03embed.xml
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/03embed.xml (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/03embed.xml (revision 255)
@@ -1 +1 @@
-voodooprojects.org.chameleon.Embed.pkg1.0Main_Package_Elements/themes/Embed/.Chameleon/Extra/Themes/installTo.pathinstallTopostInstallrelocatablerequireAuthorizationparentversionextraFilesidentifierinstallFrom.isRelativeType03embed-contents.xml/CVS$/\.svn$/\.cvsignore$/\.cvspass$/\.DS_Store$
\ No newline at end of file
+voodooprojects.org.chameleon.Embed.pkg1.0Main_Package_Elements/themes/Embed/.Chameleon/Extra/Themes/versioninstallTopostInstallrelocatablerequireAuthorizationparentidentifierinstallTo.pathextraFilesinstallFrom.isRelativeType03embed-contents.xml/CVS$/\.svn$/\.cvsignore$/\.cvspass$/\.DS_Store$
\ No newline at end of file
Index: branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/06boot-contents.xml
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/06boot-contents.xml (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/06boot-contents.xml (revision 255)
@@ -1 +1 @@
-
\ No newline at end of file
+groupowner
\ No newline at end of file
Index: branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/04bdmesg-contents.xml
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/04bdmesg-contents.xml (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/04bdmesg-contents.xml (revision 255)
@@ -1 +1 @@
-
\ No newline at end of file
+groupmodeowner
\ No newline at end of file
Index: branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/07boot-contents.xml
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/07boot-contents.xml (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/07boot-contents.xml (revision 255)
@@ -1 +1 @@
-
\ No newline at end of file
+groupowner
\ No newline at end of file
Index: branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/01fakesmc.xml
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/01fakesmc.xml (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/01fakesmc.xml (revision 255)
@@ -1 +1 @@
-voodooprojects.org.chameleon.FakeSMC.pkg1.0Main_Package_Elements/Kexts/FakeSMC.kext/.Chameleon/Extra/Extensions/installTo.pathinstallTopostInstallrelocatablerequireAuthorizationidentifierparentextraFilesversioninstallFrom.isRelativeType01fakesmc-contents.xml/CVS$/\.svn$/\.cvsignore$/\.cvspass$/\.DS_Store$
\ No newline at end of file
+voodooprojects.org.chameleon.FakeSMC.pkg1.0Main_Package_Elements/Kexts/FakeSMC.kext/.Chameleon/Extra/Extensions/parentinstallTopostInstallrelocatablerequireAuthorizationidentifierversioninstallTo.pathextraFilesinstallFrom.isRelativeType01fakesmc-contents.xml/CVS$/\.svn$/\.cvsignore$/\.cvspass$/\.DS_Store$
\ No newline at end of file
Index: branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/08boot-contents.xml
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/08boot-contents.xml (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Chameleon_Installer.pmdoc/08boot-contents.xml (revision 255)
@@ -1 +1 @@
-
\ No newline at end of file
+groupowner
\ No newline at end of file
Index: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckDiskSignature.sh
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckDiskSignature.sh (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckDiskSignature.sh (revision 255)
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-echo "==============================================="
-echo "Checkdisksignature:"
-echo "********************"
-
-# this script is passed the targetdisk to work from, for example /dev/disk0
-# It then checks the disk sector for a 4-byte Windows disk signature
-# if one is found then it exits with 1, otherwise it exits with 0
-
-if [ "$#" -eq 1 ]; then
- targetDisk="$1"
- echo "DEBUG: passed argument for targetDisk = $targetDisk"
-else
- echo "Error - wrong number of values passed - Exiting"
- exit 9
-fi
-
-disksignature=$( dd 2>/dev/null if="$targetDisk" count=1 | dd 2>/dev/null count=4 bs=1 skip=440 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
-
-echo "${disksignature}"
-
-if [ "${disksignature}" = "00000000" ]; then
- echo "No Windows installation detected."
- echo "-----------------------------------------------"
- echo ""
- exit 0
-else
- echo "Detected an existing Windows installation"
- echo "-----------------------------------------------"
- echo ""
- exit 1
-fi
-
-echo "-----------------------------------------------"
-echo ""
-
-exit 0
\ No newline at end of file
Index: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckDiskMicrocodeType.sh
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckDiskMicrocodeType.sh (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckDiskMicrocodeType.sh (revision 255)
@@ -1,40 +0,0 @@
-#!/bin/bash
-
-echo "==============================================="
-echo "Diskmicrocodetype:"
-echo "******************"
-
-# This script is passed the targetdisk
-# it then reads the MBR of the disk in the attempt to find the
-# signature for either the GRUB or Linux bootloaders.
-# The script returns 1 if either is found, or 0 if none found.
-
-if [ "$#" -eq 1 ]; then
- targetDisk="$1"
- echo "DEBUG: passed argument for targetDisk = $targetDisk"
-else
- echo "Error - wrong number of values passed"
- exit 9
-fi
-
-diskmicrocodetype[1]="GRUB,47525542"
-diskmicrocodetype[2]="LILO,4c494c4f"
-
-
-diskmicrocode=$( dd 2>/dev/null if="$targetDisk" count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
-#echo "${diskmicrocode}"
-diskmicrocodetypecounter=0
-while [ ${diskmicrocodetypecounter} -lt ${#diskmicrocodetype[@]} ]; do
- diskmicrocodetypecounter=$(( ${diskmicrocodetypecounter} + 1 ))
- diskmicrocodetypeid=${diskmicrocodetype[${diskmicrocodetypecounter}]#*,}
- if [ ! "${diskmicrocode}" = "${diskmicrocode/${diskmicrocodetypeid}/}" ]; then
- echo "${diskmicrocodetype[${diskmicrocodetypecounter}]%,*} found."
- exit 1
- else
- echo "Didn't find a match for ${diskmicrocodetype[${diskmicrocodetypecounter}]%,*}"
- fi
-done
-echo "-----------------------------------------------"
-echo ""
-
-exit 0
\ No newline at end of file
Index: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckFatType.sh
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckFatType.sh (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckFatType.sh (revision 255)
@@ -1,8 +1,8 @@
#!/bin/bash
echo "==============================================="
-echo "Check the FAT type"
-echo "******************"
+echo "CheckFatType: Do we have FAT16 or FAT32?"
+echo "****************************************"
# Receives passed value for the raw Target Device
# for example: /dev/rdisk0s2
@@ -17,6 +17,9 @@
if [ "$#" -eq 1 ]; then
targetDeviceRaw="$1"
echo "DEBUG: passed argument = $targetDeviceRaw"
+else
+ echo "Error - wrong number of values passed"
+ exit 9
fi
Index: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/WriteChameleonStage0.sh
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/WriteChameleonStage0.sh (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/WriteChameleonStage0.sh (revision 255)
@@ -19,21 +19,24 @@
echo "DEBUG: passed argument for stage0Loaderdualboot = $stage0Loaderdualboot"
echo "DEBUG: passed argument for targetDisk = $targetDisk"
echo "DEBUG: passed argument for targetVolume = $targetVolume"
+else
+ echo "Error - wrong number of values passed"
+ exit 9
fi
-if [ ${diskupdate} = "1" ]; then
+if [ ${diskupdate} = "0" ]; then
echo "Diskupdate = true, so yes"
if [ ${disksignature} = "0" ]; then
# ThereÕs no Windows disk signature then we can write boot0
echo "Executing command: ${targetVolume}/.Chameleon/i386/fdisk440 -u -f ${targetVolume}/.Chameleon/i386/$stage0Loader -y ${targetDisk}"
- ${targetVolume}/.Chameleon/i386/fdisk440 -u -f ${targetVolume}/.Chameleon/i386/${stage0Loader} -y ${targetDisk}
+ "${targetVolume}"/.Chameleon/i386/fdisk440 -u -f "${targetVolume}"/.Chameleon/i386/${stage0Loader} -y ${targetDisk}
else
# Windows is also installed on the HDD and we need to write boot0hfs
echo "Executing command: ${targetVolume}/.Chameleon/i386/fdisk440 -u -f ${targetVolume}/.Chameleon/i386/${stage0Loaderdualboot} -y ${targetDisk}"
- ${targetVolume}/.Chameleon/i386/fdisk440 -u -f ${targetVolume}/.Chameleon/i386/${stage0Loaderdualboot} -y ${targetDisk}
+ "${targetVolume}"/.Chameleon/i386/fdisk440 -u -f "${targetVolume}"/.Chameleon/i386/${stage0Loaderdualboot} -y ${targetDisk}
fi
fi
Index: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/WriteChameleonStage1.sh
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/WriteChameleonStage1.sh (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/WriteChameleonStage1.sh (revision 255)
@@ -19,6 +19,9 @@
echo "DEBUG: passed argument for selectedDestination = $selectedDestination"
echo "DEBUG: passed argument for targetDeviceRaw = $targetDeviceRaw"
echo "DEBUG: passed argument for targetVolume = $targetVolume"
+else
+ echo "Error - wrong number of values passed"
+ exit 9
fi
if [ ${espformat} = "1" ]; then
Index: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/WriteChameleonStage2.sh
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/WriteChameleonStage2.sh (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/WriteChameleonStage2.sh (revision 255)
@@ -20,6 +20,9 @@
echo "DEBUG: passed argument for selectedDestination = $selectedDestination"
echo "DEBUG: passed argument for targetDevice = $targetDevice"
echo "DEBUG: passed argument for targetVolume = $targetVolume"
+else
+ echo "Error - wrong number of values passed"
+ exit 9
fi
# check to see if install to EFI system partition was selected
Index: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckDiskMicrocode.sh
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckDiskMicrocode.sh (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckDiskMicrocode.sh (revision 255)
@@ -1,8 +1,8 @@
#!/bin/bash
echo "==============================================="
-echo "Entering CheckDiskMicrocode:"
-echo "****************************"
+echo "CheckDiskMicrocode: Any existing bootloaders?"
+echo "*********************************************"
# This script is passed the targetDisk and diskSigCheck.
#
@@ -11,8 +11,8 @@
# which might be better changed depending on whether or not a Windows
# signature is found or not.
#
-# The script then exits with the value 1 to indicate that Chameleon stage0
-# loader can be written, or 0 to indicate not to write the stage0 loader.
+# The script then exits with the value 0 to indicate that Chameleon stage0
+# loader can be written, or 1 to indicate not to write the stage0 loader.
if [ "$#" -eq 2 ]; then
targetDisk="$1"
@@ -34,10 +34,6 @@
if [ $( echo "${mbr437}" | awk -F0 '{print NF-1}' ) = 874 ]; then
echo "The first 437 bytes of the MBR Disk Sector is blank - Updating"
- echo "diskupdate is now set to true."
- echo "-----------------------------------------------"
- echo ""
- exit 1
else
# There is already something on the MBR
@@ -46,10 +42,6 @@
windowsloader=$( dd 2>/dev/null if="$targetDisk" count=4 bs=1 | xxd | awk '{print $2$3}' )
if [ "${windowsloader}" == "33c08ed0" ] ; then
echo "Found existing Windows Boot Loader so will replace with Chameleon Boot0hfs"
- echo "diskupdate is now set to true."
- echo "-----------------------------------------------"
- echo ""
- exit 1
fi
# See if a Chameleon stage0 boot file already exists
@@ -63,43 +55,34 @@
if [ "${stage0type}" == "0b807c" ]; then
echo "Found existing Chameleon stage 0 loader - Boot0hfs"
- # CheckDiskSignature.sh returns 0 if a Windows installation was NOT found
+ # Script CheckDiskSignature.sh returned 0 if a Windows installation was NOT found
if [ "$diskSigCheck" == "0" ]; then
echo "Found no existing Windows installation so will replace stage 0 loader with Boot0"
- echo "diskupdate is now set to true."
- echo "-----------------------------------------------"
- echo ""
- exit 1
fi
fi
if [ "${stage0type}" == "0a803c" ]; then
echo "Found existing Chameleon stage 0 loader - Boot0"
- # CheckDiskSignature.sh returns 1 if a Windows installation was found
+ # Script CheckDiskSignature.sh returned 1 if a Windows installation was found
if [ "$diskSigCheck" = "1" ]; then
echo "Found existing Windows installation so will replace stage 0 loader with Boot0hfs"
- echo "diskupdate is now set to true."
- echo "-----------------------------------------------"
- echo ""
- exit 1
fi
fi
- # If neither Chameleon Boot Loader or Windows loader exists
if [ "${stage0type}" != "0b807c" ] && [ "${stage0type}" != "0a803c" ] && [ "${windowsloader}" != "33c08ed0" ] ; then
+ echo "Something other than Chameleon or a Windows bootloader was found"
test=$(echo "${mbr437}" | awk -F0 '{print NF-1}' )
echo "Disk microcode found: ${test} - Preserving."
- echo "diskupdate is left at false"
+ echo "diskupdate is set to false"
echo "-----------------------------------------------"
echo ""
- exit 0
+ exit 1
fi
fi
-
+echo "diskupdate is now set to true."
echo "-----------------------------------------------"
echo ""
-echo ""
exit 0
Index: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckProceed.sh
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckProceed.sh (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckProceed.sh (revision 255)
@@ -1,8 +1,8 @@
#!/bin/bash
echo "==============================================="
-echo "Check Proceed - Can the script continue?"
-echo "******************************************"
+echo "Check Proceed: Can the script continue?"
+echo "***************************************"
# Receives targetVolume and targetDevice
# Checks the selected volume is present and the disk
@@ -13,6 +13,9 @@
targetDevice="$2"
echo "DEBUG: passed argument for targetVolume = $targetVolume"
echo "DEBUG: passed argument for targetDevice = $targetDevice"
+else
+ echo "Error - wrong number of values passed"
+ exit 9
fi
if [ -z "$targetVolume" ]; then
Index: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/SetActivePartition.sh
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/SetActivePartition.sh (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/SetActivePartition.sh (revision 255)
@@ -21,7 +21,9 @@
echo "DEBUG: passed argument for targetDiskRaw = $targetDiskRaw"
echo "DEBUG: passed argument for targetSlice = $targetSlice"
echo "DEBUG: passed argument for targetVolume = $targetVolume"
-
+else
+ echo "Error - wrong number of values passed"
+ exit 9
fi
if [ ${diskSigCheck} == "0" ]; then
Index: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/postflight.sh
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/postflight.sh (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/postflight.sh (revision 255)
@@ -25,8 +25,16 @@
if [ -d "${3}"/.Chameleon/Extra ]; then
- # Check to see if install to EFI system partition was selected
- # if chosen, the package installer would have added a file named
+ # TO DO - Set permissions of temporary /Extra folder
+ # É
+
+
+ # If user selected to the standard installation
+ # then the package installer would have added a file named
+ # 'nullstandard' in to the temporary directory /.Chameleon
+
+ # If user selected to install to EFI system partition
+ # then the package installer would have added a file named
# 'nullESP' in to the temporary directory /.Chameleon
# We also need to check to see if the user selected both the
@@ -48,8 +56,9 @@
rm -f -R "/Volumes/EFI/Extra"
fi
- echo "Executing command: ditto ${3}/.Chameleon/Extra /Volumes/EFI/Extra"
- ditto "${3}"/.Chameleon/Extra /Volumes/EFI/Extra
+ # copy temporary /Extra folder to the selected destination.
+ echo "Executing command: cp ${3}/.Chameleon/Extra /Volumes/EFI/Extra"
+ cp -R "${3}"/.Chameleon/Extra /Volumes/EFI/Extra
echo "Executing command: umount -f Volumes/EFI"
"$scriptDir"UnMountEFIvolumes.sh
@@ -70,8 +79,8 @@
rm -f -R "${3}"/Extra
fi
- echo "Executing command: ditto ${3}/.Chameleon/Extra ${3}/Extra"
- ditto "${3}"/.Chameleon/Extra "${3}"/Extra
+ echo "Executing command: cp ${3}/.Chameleon/Extra ${3}/Extra"
+ cp -R "${3}"/.Chameleon/Extra "${3}"/Extra
fi
fi
Index: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckWindowsDiskSignature.sh
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckWindowsDiskSignature.sh (revision 0)
+++ branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckWindowsDiskSignature.sh (revision 255)
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+echo "==============================================="
+echo "CheckWindowsDiskSignature: Is Windows installed?"
+echo "************************************************"
+
+# this script is passed the targetdisk to work from, for example /dev/disk0
+# It then checks the disk sector for a 4-byte Windows disk signature
+# if one is found then it exits with 1, otherwise it exits with 0
+
+if [ "$#" -eq 1 ]; then
+ targetDisk="$1"
+ echo "DEBUG: passed argument for targetDisk = $targetDisk"
+else
+ echo "Error - wrong number of values passed - Exiting"
+ exit 9
+fi
+
+disksignature=$( dd 2>/dev/null if="$targetDisk" count=1 | dd 2>/dev/null count=4 bs=1 skip=440 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+echo "${disksignature}"
+
+if [ "${disksignature}" = "00000000" ]; then
+ echo "No Windows installation detected."
+ echo "-----------------------------------------------"
+ echo ""
+ exit 0
+else
+ echo "Detected an existing Windows installation"
+ echo "-----------------------------------------------"
+ echo ""
+ exit 1
+fi
+
+echo "-----------------------------------------------"
+echo ""
+
+exit 0
\ No newline at end of file
Property changes on: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckWindowsDiskSignature.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckFormat.sh
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckFormat.sh (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckFormat.sh (revision 255)
@@ -1,8 +1,8 @@
#!/bin/bash
echo "==============================================="
-echo "Check the format of the selected partition"
-echo "******************************************"
+echo "CheckFormat: Is target HFS or MSDOS?"
+echo "**********************************************"
# Receives passed value for the Target Volume Device
# for example: /dev/disk0s2
@@ -13,6 +13,9 @@
if [ "$#" -eq 1 ]; then
targetDevice="$1"
echo "DEBUG: passed argument for targetDevice = $targetDevice"
+else
+ echo "Error - wrong number of values passed"
+ exit 9
fi
if [ "$( fstyp "$targetDevice" | grep hfs )" ]; then
Index: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/MainESPPostinstall.sh
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/MainESPPostinstall.sh (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/MainESPPostinstall.sh (revision 255)
@@ -97,8 +97,9 @@
# Does a GRUB or Linux loader already exist in the disk's MBR?
+ # The script returns 1 if yes, 0 if no.
- "$scriptDir"CheckDiskMicrocodeType.sh "${targetDisk}"
+ "$scriptDir"CheckGRUBLinuxLoader.sh "${targetDisk}"
returnValue=$?
if [ ${returnValue} = 0 ]; then
# OK to proceed
@@ -107,26 +108,19 @@
# check for a 4-byte Windows disk signature in the disk's MBR.
# the following script returns 1 if a Windows disk signature exists, and 0 if not.
- "$scriptDir"CheckDiskSignature.sh "${targetDisk}"
+ "$scriptDir"CheckWindowsDiskSignature.sh "${targetDisk}"
diskSigCheck=$?
# check for existing bootloaders in the disk's MBR
# and find out if we can write the Chameleon boot files.
- # the following script returns 1 if we can proceed
- # with writing the boot files, and 0 for not.
+ # the following script returns 0 if we can proceed
+ # with writing the boot files, and 1 for not.
"$scriptDir"CheckDiskMicrocode.sh "${targetDisk}" "${diskSigCheck}"
diskupdate=$?
- # Cancelled this as all it does is read the GPTdiskProtectiveMBR
- # and the GPTdiskGPTHeader and look to see if they're blank
- # then make a note of the MD5 for eachÉ But they're never used?
-
- #"$scriptDir"FindPartitionBootcode.sh "${targetDeviceRaw}"
-
-
# check the format of the selected partition.
# the following script returns 1 if HFS
# the following script returns 2 if MSDOS
@@ -152,8 +146,8 @@
# OK to proceed
- # If diskupdate is flagged as 1 then the stage 0 loader can be written to the MBR
- if [ ${diskupdate} = 1 ]; then
+ # If diskupdate is flagged as 0 then the stage 0 loader can be written to the MBR
+ if [ ${diskupdate} = 0 ]; then
"$scriptDir"WriteChameleonStage0.sh "${diskupdate}" "${diskSigCheck}" "${stage0Loader}" "${stage0LoaderDualBoot}" "${targetDisk}" "${targetVolumeTemp}"
fi
Index: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckPartitionScheme.sh
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckPartitionScheme.sh (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckPartitionScheme.sh (revision 255)
@@ -1,8 +1,8 @@
#!/bin/bash
echo "==============================================="
-echo "Check the Partition Scheme"
-echo "******************************************"
+echo "Check the Partition Scheme: GPT, GPT/MBR or MBR?"
+echo "************************************************"
# Receives passed value for the Target Disk
# for example: /dev/disk0s2
@@ -17,6 +17,9 @@
if [ "$#" -eq 1 ]; then
targetDisk="$1"
echo "DEBUG: passed argument = $targetDisk"
+else
+ echo "Error - wrong number of values passed"
+ exit 9
fi
Index: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/BuildBootOptions.sh
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/BuildBootOptions.sh (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/BuildBootOptions.sh (revision 255)
@@ -45,164 +45,133 @@
echo "Build Extra/com.apple.Boot.plist"
echo "********************************"
- for bootOptionFile in $Dirlist ; do
- overide=$(echo $bootOptionFile | sed 's/_/ /g' | tr -d "./@" |cut -d '+' -f1)
- string=$(echo $bootOptionFile | tr -d "./@" |cut -d'+' -f2)
+ mv "${bootplist}" "${bootplist}.orig"
- bootoptionshdextra[1]="${overide}"
- bootoptionshdextra[2]="${string}"
- #echo "DEBUG: bootoptionshdextra 1 = ${bootoptionshdextra[1]}"
- #echo "DEBUG: bootoptionshdextra 2= ${bootoptionshdextra[2]}"
+ #prefunctionifs="${IFS}"
- echo "Attempting to add ${overide}=${string} to ${bootplist}"
- array=("${bootoptionshdextra[@]}")
- searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
- echo ""
+ fileinput="${bootplist}.orig"
+ fileoutput="${bootplist}"
+ find="Kernel Flags"
+ replace=""
+ deletelines=""
+ insertlinesskip="2"
- #echo "set owner privileges for ${bootplist}"
- chown "${USER}:20" "${bootplist}"
- done
+ matchlinefound="0"
- echo "-----------------------------------------------"
- echo ""
-
+ while read line
+ do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
- echo "==============================================="
- echo "Clean up and Remove Boot Option Null Files"
- echo "******************************************"
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
- # make sure we're in the right directory
- cd "${tempDir}"
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
- Dirlist=$(find . -type f | grep "@")
- for bootOptionFile in ${Dirlist} ; do
- echo "Removing temporary boot option file: ${bootOptionFile}"
- rm $bootOptionFile
- done
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
- echo "-----------------------------------------------"
- echo ""
+ if [ "${replace}" ]; then
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ else
+ echo "${line}" >>"${fileoutput}"
+ fi
- else
- echo "No boot options in the temporary directory."
- fi
- fi
-}
+ matchlinefound="1"
+ }
+ else
+ {
-searchfilereplaceline ()
-{
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
-mv "${1}" "${1}.orig"
+ for bootOptionFile in $Dirlist ; do
+ overide=$(echo $bootOptionFile | sed 's/_/ /g' | tr -d "./@" |cut -d '+' -f1)
+ string=$(echo $bootOptionFile | tr -d "./@" |cut -d'+' -f2)
-prefunctionifs="${IFS}"
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
-unset fileinput
-unset fileoutput
-unset find
-unset replace
-unset deletelines
-unset deletelinesskip
-unset insertlinesskip
+ echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ arraysize=0
-fileinput="${1}.orig"
-fileoutput="${1}"
-find="${2}"
-replace="${3}"
-deletelines="${4%,*}"
-insertlinesskip="${5}"
+ #prefunctionifs="${IFS}"
+ #IFS="\n"
-matchlinefound="0"
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
-if [ "${#4}" = "${4#*,}" ]; then
- deletelinesskip="0"
- else
- deletelinesskip="${4#*,}"
-fi
+ #IFS=${prefunctionifs}
+ done
-IFS="\n"
-while read line
-do
- {
- if [ ! "${line}" = "${line/${find}/}" ]; then
- {
- # Trim the longest match from the end for <*
- xmlelementindent="${line%%<*}"
+ #echo "set owner privileges for ${bootplist}"
+ chown "${USER}:20" "${bootplist}"
+ fi
+ fi
- # Trim the longest match from the start for *<
- xmlelementtemp="${line#*<}"
- # Add back in stripped <
- xmlelement="<${xmlelementtemp}"
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ :
+ else
+ echo "${line}" >>"${fileoutput}"
+ fi
- # Trim the shortest match from the start for <
- xmltagtemp="${xmlelement#<}"
- # Trim the longest match from the end for >*
- xmltag="${xmltagtemp%%>*}"
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
- # Trim the shortest match from the start for *>
- xmltexttemp="${xmlelement#*>}"
- # Trim the longest match from the end for <*
- xmltext="${xmltexttemp%%<*}"
+ }
+ fi
+ }
+ done < "${fileinput}"
- if [ "${replace}" ]; then
- echo "DEBUG: Replace=${replace}"
- {
- echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
- }
- else
- {
- echo "${line}" >>"${fileoutput}"
- }
- fi
- matchlinefound="1"
+ #IFS=${prefunctionifs}
+ rm -f "${fileinput}"
- }
- else
- {
+ echo ""
- if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
- {
- if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
- {
- arraysize=0
- while [ ${arraysize} -lt ${#array[@]} ];
- do
- #echo "DEBUG: ${xmlelementindent}${array[${arraysize}]}"
- echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
- let arraysize="${arraysize}+1"
- done
- }
- fi
- }
- fi
+ echo "-----------------------------------------------"
+ echo ""
+
- if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
- echo "DEBUG: Delete=${matchlinefound}"
- {
- :
- }
- else
- {
- echo "${line}" >>"${fileoutput}"
- }
- fi
+ echo "==============================================="
+ echo "Clean up and Remove Boot Option Null Files"
+ echo "******************************************"
- if [ "${matchlinefound}" -gt 0 ]; then
- let matchlinefound="${matchlinefound}+1"
- fi
+ # make sure we're in the right directory
+ cd "${tempDir}"
- }
- fi
- }
-done < "${fileinput}"
+ Dirlist=$(find . -type f | grep "@")
+ for bootOptionFile in ${Dirlist} ; do
+ echo "Removing temporary boot option file: ${bootOptionFile}"
+ rm $bootOptionFile
+ done
-IFS=${prefunctionifs}
+ echo "-----------------------------------------------"
+ echo ""
-echo " rm -f ${fileinput}"
-rm -f "${fileinput}"
+ else
+ echo "No boot options in the temporary directory."
+ fi
+ fi
}
+
echo "==============================================="
echo "Enter Build Boot Options script"
echo "*******************************"
Index: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/MainStandardPostinstall.sh
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/MainStandardPostinstall.sh (revision 254)
+++ branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/MainStandardPostinstall.sh (revision 255)
@@ -76,8 +76,9 @@
# Does a GRUB or Linux loader already exist in the disk's MBR?
+ # The script returns 1 if yes, 0 if no.
- "$scriptDir"CheckDiskMicrocodeType.sh "${targetDisk}"
+ "$scriptDir"CheckGRUBLinuxLoader.sh "${targetDisk}"
returnValue=$?
if [ ${returnValue} = 0 ]; then
# OK to proceed
@@ -86,26 +87,19 @@
# check for a 4-byte Windows disk signature in the disk's MBR.
# the following script returns 1 if a Windows disk signature exists, and 0 if not.
- "$scriptDir"CheckDiskSignature.sh "${targetDisk}"
+ "$scriptDir"CheckWindowsDiskSignature.sh "${targetDisk}"
diskSigCheck=$?
# check for existing bootloaders in the disk's MBR
# and find out if we can write the Chameleon boot files.
- # the following script returns 1 if we can proceed
- # with writing the boot files, and 0 for not.
+ # the following script returns 0 if we can proceed
+ # with writing the boot files, and 1 for not.
"$scriptDir"CheckDiskMicrocode.sh "${targetDisk}" "${diskSigCheck}"
diskupdate=$?
- # Cancelled this as all it does is read the GPTdiskProtectiveMBR
- # and the GPTdiskGPTHeader and look to see if they're blank
- # then make a note of the MD5 for eachÉ But they're never used?
-
- #"$scriptDir"FindPartitionBootcode.sh "${targetDeviceRaw}"
-
-
# check the format of the selected partition.
# the following script returns 1 if HFS
# the following script returns 2 if MSDOS
@@ -141,8 +135,8 @@
else
# Continue if the selected device is not a FAT16 format device
- # If diskupdate is flagged as 1 then the stage 0 loader can be written to the MBR
- if [ ${diskupdate} = 1 ]; then
+ # If diskupdate is flagged as 0 then the stage 0 loader can be written to the MBR
+ if [ ${diskupdate} = 0 ]; then
"$scriptDir"WriteChameleonStage0.sh "${diskupdate}" "${diskSigCheck}" "${stage0Loader}" "${stage0LoaderDualBoot}" "${targetDisk}" "${targetVolume}"
fi
Index: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckGRUBLinuxLoader.sh
===================================================================
--- branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckGRUBLinuxLoader.sh (revision 0)
+++ branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckGRUBLinuxLoader.sh (revision 255)
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+echo "==============================================="
+echo "CheckGRUBLinuxLoader: Does GRUB or LILO exist?"
+echo "**********************************************"
+
+# This script is passed the targetdisk
+# it then reads the MBR of the disk in the attempt to find the
+# signature for either the GRUB or Linux bootloaders.
+# The script returns 1 if either is found, or 0 if none found.
+
+if [ "$#" -eq 1 ]; then
+ targetDisk="$1"
+ echo "DEBUG: passed argument for targetDisk = $targetDisk"
+else
+ echo "Error - wrong number of values passed"
+ exit 9
+fi
+
+diskmicrocodetype[1]="GRUB,47525542"
+diskmicrocodetype[2]="LILO,4c494c4f"
+
+
+diskmicrocode=$( dd 2>/dev/null if="$targetDisk" count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+#echo "${diskmicrocode}"
+diskmicrocodetypecounter=0
+while [ ${diskmicrocodetypecounter} -lt ${#diskmicrocodetype[@]} ]; do
+ diskmicrocodetypecounter=$(( ${diskmicrocodetypecounter} + 1 ))
+ diskmicrocodetypeid=${diskmicrocodetype[${diskmicrocodetypecounter}]#*,}
+ if [ ! "${diskmicrocode}" = "${diskmicrocode/${diskmicrocodetypeid}/}" ]; then
+ echo "${diskmicrocodetype[${diskmicrocodetypecounter}]%,*} found."
+ exit 1
+ else
+ echo "Didn't find a match for ${diskmicrocodetype[${diskmicrocodetypecounter}]%,*}"
+ fi
+done
+echo "-----------------------------------------------"
+echo ""
+
+exit 0
\ No newline at end of file
Property changes on: branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/CheckGRUBLinuxLoader.sh
___________________________________________________________________
Added: svn:executable
+ *