#!/bin/bash␊ |
␊ |
␊ |
diskloader="boot0"␊ |
diskloaderdualboot="boot0md"␊ |
partitionloaderhfs="boot1h"␊ |
|
echo "*************************************"␊ |
␊ |
if [ "$( fstyp ${bootdev} | grep hfs )" ]; then␊ |
␉echo "${bootdev} is a currently formatted as HFS"␊ |
␉echo "${bootdev} is currently formatted as HFS"␊ |
␉efiformat="hfs"␊ |
fi␊ |
if [ "$( fstyp ${bootdev} | grep msdos )" ]; then␊ |
␉echo "${bootdev} is currently formatted as msdos"␊ |
␉echo "${bootdev} is currently formatted as msdos" #Azipkg: hum... it's not really msdos, but ok...␊ |
␉efiformat="msdos"␊ |
fi ␊ |
echo "-----------------------------------------------"␊ |
|
␉echo "Diskupdate = true, so yes"␊ |
␉#---------------------------------------------------------------------␊ |
␉# Check bytes 438-446 of the GPTdiskProtectiveMBR for a Windows Disk Signature␊ |
|
␉# If there's no Windows disk signature then we can write boot0␊ |
␉#---------------------------------------------------------------------␊ |
␊ |
␉if [ ${disksignature} == "00000000" ]; then␊ |
|
␊ |
if [ ${efiformat} = "msdos" ]; then␊ |
␉echo "Executing command: dd if=/usr/standalone/i386/${partitionloaderfat} of=${bootrdev}"␊ |
␉#Azipkg: just like this??... no preparation???␊ |
␉dd if="${bootvolume}/usr/standalone/i386/${partitionloaderfat}" of=${bootrdev}␊ |
fi␊ |
␊ |
echo "Executing command: cp /usr/standalone/i386/${filesystemloader} ${bootvolume}"␊ |
cp "${bootvolume}/usr/standalone/i386/${filesystemloader}" "${bootvolume}"␊ |
␊ |
echo "Executing command: ${bootresources}/Tools/SetFile -a V ${bootvolume}/${filesystemloader}"␊ |
"${bootresources}/Tools/SetFile" -a V "${bootvolume}/${filesystemloader}"␊ |
#Azipkg: at this point, we don't know if the user has setfile installed...␊ |
# and it looks like it's not found on "booteresources" ???␊ |
# do we really want to hide "boot"?... i never do...! IS THIS DONE HERE ??? SEE AT THE END OF THE FILE...␊ |
#echo "Executing command: ${bootresources}/Tools/SetFile -a V ${bootvolume}/${filesystemloader}"␊ |
#"${bootresources}/Tools/SetFile" -a V "${bootvolume}/${filesystemloader}"␊ |
␊ |
echo "-----------------------------------------------"␊ |
echo ""␊ |
|
echo "Set Active Partition ONLY if Windows is not installed"␊ |
echo "*****************************************************"␊ |
␊ |
#Azipkg: works for EFI, but does it work for other GPT partitions?... check, was under the impression that NO??!␊ |
if [ ${disksignature} == "00000000" ]; then␊ |
␉# echo "Windows is not installed so let's change the active partition"␊ |
␊ |
|
echo ""␊ |
␊ |
# hide boot file␊ |
#Azipkg: do we really want to hide "boot"?... i never do...␊ |
chflags hidden "${3}/boot"␊ |
echo "boot file hidden ${3}/boot"␊ |
␊ |