Chameleon

Chameleon Commit Details

Date:2015-03-05 17:40:07 (4 years 5 months ago)
Author:ErmaC
Commit:2589
Parents: 2588
Message:Update pkg scripts (Credits to Micky1979)
Changes:
M/branches/ErmaC/Enoch/package/Scripts/Main/ESPpostinstall
M/branches/ErmaC/Enoch/package/Scripts.templates/Post/postinstall
M/branches/ErmaC/Enoch/package/Scripts.templates/Pre/preinstall
M/branches/ErmaC/Enoch/package/Scripts/Main/Standardpostinstall

File differences

branches/ErmaC/Enoch/package/Scripts.templates/Post/postinstall
5656
5757
5858
59
60
61
62
63
6459
6560
6661
......
8176
8277
8378
79
80
81
82
83
8484
8585
8686
echo "Moving Extra folder to ${choicedVolume}"
cp -R "${v_mntpt}/Extra" "${choicedVolume}"/
echo "NOTE: any Themes or modules you have must be there since this now"
echo " is the boot partition. ACPI tables, SMBios.plist and the"
echo " org.chameleon.Boot.plist (with custom settings for the target"
echo " OSX must be in each partition that contain it.)"
echo "$subLine"
echo "Post postinstall script complete"
echo "$mainLine"
# copying the installer log inside the Extra folder
if [[ $( /usr/libexec/PlistBuddy -c "Print bootloader" ${configFile} ) == "true" ]];then
# if we have installed the bootloader, this is a new log
echo "NOTE: any Themes or modules you have must be there since this now"
echo " is the boot partition. ACPI tables, SMBios.plist and the"
echo " org.chameleon.Boot.plist (with custom settings for the target"
echo " OSX must be in each partition that contain it.)"
echo "$mainLine"
cat "${v_mntpt}/${logName}" > "${choicedVolume}/Extra/${logName}"
else
# ..otherwise adding the new log to the existing one (if exist)
branches/ErmaC/Enoch/package/Scripts.templates/Pre/preinstall
6565
6666
6767
68
69
70
6871
6972
7073
exec > >(tee -a "${v_mntpt}/${logName}") 2>&1
echo "$mainLine"
echo "SYSTEM INFO:"
sw_vers
echo "$mainLine"
echo "Pre-Install Script"
echo "$subLine"
branches/ErmaC/Enoch/package/Scripts/Main/ESPpostinstall
177177
178178
179179
180
181
182
183
184
185
186
187
188
189
190
180
181
182
183
184
185
186
187
188
189
190
191
191192
192193
193194
......
197198
198199
199200
201
202
203
200204
201
202
205
206
203207
204
205
206208
207209
208210
}
# --------------------------------------------------------------------------------------------------------
PARTITION_ACTIVE_IF() {
echo -e "${mainLine}\nSET PARTITION ACTIVE:"
# if Windows was detected, don't activate the partition..
# if the stage 0 loader is boo0hfs, don't activate the partition
if [ WINDOWS_EXIST = "0" ] || [ "${stage0Loader}" != "boot0hfs" ];then
partitionactive=$( fdisk -d ${targetDiskRaw} | grep -n "*" | awk -F: '{print $1}')
if [ "${partitionactive}" ] && [ "${partitionactive}" = "${targetSlice}" ]; then
echo "${targetDiskRaw#/dev/r}, slice "${targetSlice}" is already set active. No need to change it."
else
echo "Setting ${choicedVolume} partition active."
# BadAxe requires EFI partition to be flagged active.
# but it doesn't' hurt to do it for any non-windows partition.
if [ $InstallBootloader = "1" ];then
echo -e "${mainLine}\nSET PARTITION ACTIVE:"
# if Windows was detected, don't activate the partition..
# if the stage 0 loader is boo0hfs, don't activate the partition
if [ WINDOWS_EXIST = "0" ] || [ "${stage0Loader}" != "boot0hfs" ];then
partitionactive=$( fdisk -d ${targetDiskRaw} | grep -n "*" | awk -F: '{print $1}')
if [ "${partitionactive}" ] && [ "${partitionactive}" = "${targetSlice}" ]; then
echo "${targetDiskRaw#/dev/r}, slice "${targetSlice}" is already set active. No need to change it."
else
echo "Setting ${choicedVolume} partition active."
# BadAxe requires EFI partition to be flagged active.
# but it doesn't' hurt to do it for any non-windows partition.
# leave left aligned the follow code:
fdisk -e ${targetDiskRaw} <<-MAKEACTIVE
y
quit
MAKEACTIVE
fi
else
echo "Partition will not activate when Windows is detected or stage 0 is boot0hfs"
fi
else
echo "Partition will not activate when Windows is detected or stage 0 is boot0hfs"
echo ""
echo "$mainLine"
fi
echo ""
echo "$mainLine"
}
# --------------------------------------------------------------------------------------------------------
# Writing stage 0
branches/ErmaC/Enoch/package/Scripts/Main/Standardpostinstall
177177
178178
179179
180
181
182
183
184
185
186
187
188
189
190
180
181
182
183
184
185
186
187
188
189
190
191
191192
192193
193194
......
197198
198199
199200
201
202
203
200204
201
202
205
206
203207
204
205
206208
207209
208210
}
# --------------------------------------------------------------------------------------------------------
PARTITION_ACTIVE_IF() {
echo -e "${mainLine}\nSET PARTITION ACTIVE:"
# if Windows was detected, don't activate the partition..
# if the stage 0 loader is boo0hfs, don't activate the partition
if [ WINDOWS_EXIST = "0" ] || [ "${stage0Loader}" != "boot0hfs" ];then
partitionactive=$( fdisk -d ${targetDiskRaw} | grep -n "*" | awk -F: '{print $1}')
if [ "${partitionactive}" ] && [ "${partitionactive}" = "${targetSlice}" ]; then
echo "${targetDiskRaw#/dev/r}, slice "${targetSlice}" is already set active. No need to change it."
else
echo "Setting ${choicedVolume} partition active."
# BadAxe requires EFI partition to be flagged active.
# but it doesn't' hurt to do it for any non-windows partition.
if [ $InstallBootloader = "1" ];then
echo -e "${mainLine}\nSET PARTITION ACTIVE:"
# if Windows was detected, don't activate the partition..
# if the stage 0 loader is boo0hfs, don't activate the partition
if [ WINDOWS_EXIST = "0" ] || [ "${stage0Loader}" != "boot0hfs" ];then
partitionactive=$( fdisk -d ${targetDiskRaw} | grep -n "*" | awk -F: '{print $1}')
if [ "${partitionactive}" ] && [ "${partitionactive}" = "${targetSlice}" ]; then
echo "${targetDiskRaw#/dev/r}, slice "${targetSlice}" is already set active. No need to change it."
else
echo "Setting ${choicedVolume} partition active."
# BadAxe requires EFI partition to be flagged active.
# but it doesn't' hurt to do it for any non-windows partition.
# leave left aligned the follow code:
fdisk -e ${targetDiskRaw} <<-MAKEACTIVE
y
quit
MAKEACTIVE
fi
else
echo "Partition will not activate when Windows is detected or stage 0 is boot0hfs"
fi
else
echo "Partition will not activate when Windows is detected or stage 0 is boot0hfs"
echo ""
echo "$mainLine"
fi
echo ""
echo "$mainLine"
}
# --------------------------------------------------------------------------------------------------------
# Writing stage 0

Archive Download the corresponding diff file

Revision: 2589