Index: branches/blackosx/package/BootOptions/Resolution.txt
===================================================================
--- branches/blackosx/package/BootOptions/Resolution.txt (revision 1586)
+++ branches/blackosx/package/BootOptions/Resolution.txt (revision 1587)
@@ -1,6 +1,6 @@
# ---------------------------------------------
# Chameleon boot options list.
-#ÊStructure is name:key=value
+# Structure is name:key=value
# Note: There must be a carriage return at end of last line
# ---------------------------------------------
Exclusive=True
Index: branches/blackosx/package/BootOptions/KernelFlags.txt
===================================================================
--- branches/blackosx/package/BootOptions/KernelFlags.txt (revision 1586)
+++ branches/blackosx/package/BootOptions/KernelFlags.txt (revision 1587)
@@ -1,8 +1,12 @@
# ---------------------------------------------
# Chameleon boot options list.
#Â Structure is name:key=value
+# To Add kernel flag: format is name:KFflag=kernelflag
# Note: There must be a carriage return at end of last line
# ---------------------------------------------
Exclusive=False
# ---------------------------------------------
-Npci:KF npci=0x2000
+Verbose:KFflag=-v
+Singleusermode:KFflag=-s
+Ignorecaches:KFflag=-f
+Npci:KFflag=npci=0x2000
Index: branches/blackosx/package/TO DO.txt
===================================================================
--- branches/blackosx/package/TO DO.txt (revision 1586)
+++ branches/blackosx/package/TO DO.txt (revision 1587)
@@ -1,8 +1,4 @@
TO DO
-*Â Fix - Keylayouts to match new style for building org.chameleon.boot.plist. = DONE
-* Check if boot options already exist before adding with plistbuddy.
-* Check also kernel flags before adding with plistbuddy
* Add theme to org.chameleon.boot.plist? (Do what when more than one installed?)
-* Install log is so far ONLY generated when selecting to install Chameleon.
-* Include Boot options/kernel flags/keylayouts/themes to install log.
\ No newline at end of file
+* Implement adding more than one kernel flag.
\ No newline at end of file
Index: branches/blackosx/package/Scripts/Main/Standard/postinstall
===================================================================
--- branches/blackosx/package/Scripts/Main/Standard/postinstall (revision 1586)
+++ branches/blackosx/package/Scripts/Main/Standard/postinstall (revision 1587)
@@ -71,8 +71,9 @@
versionNumber=`cat "${scriptDir}"/Resources/version`
revisionNumber=`cat "${scriptDir}"/Resources/revision`
"$scriptDir"InstallLog.sh "${targetVolume}" "Installer version: ${versionNumber} ${revisionNumber}"
-"$scriptDir"InstallLog.sh "${targetVolume}" "Running Standard postinstall script
-Target volume = ${targetVolume}"
+"$scriptDir"InstallLog.sh "${targetVolume}" "Diskutil"
+"$scriptDir"InstallLog.sh "${targetVolume}" "Running Standard postinstall script"
+"$scriptDir"InstallLog.sh "${targetVolume}" "Target volume = ${targetVolume}"
# Double check we can see the selected partition and it's of the right type
Index: branches/blackosx/package/Scripts/Main/EFI/postinstall
===================================================================
--- branches/blackosx/package/Scripts/Main/EFI/postinstall (revision 1586)
+++ branches/blackosx/package/Scripts/Main/EFI/postinstall (revision 1587)
@@ -74,9 +74,9 @@
versionNumber=`cat "${scriptDir}"/Resources/version`
revisionNumber=`cat "${scriptDir}"/Resources/revision`
"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Installer version: ${versionNumber} ${revisionNumber}"
-"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Running EFI postinstall script
-Target volume selected by user = ${targetVolumeChosenByUser}
-Target volume = ${targetVolume}"
+"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Diskutil"
+"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Running EFI postinstall script"
+"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Target volume = ${targetVolume}"
# Check to see if the selected disk uses a GPT
Index: branches/blackosx/package/Scripts/Main/Post/postinstall
===================================================================
--- branches/blackosx/package/Scripts/Main/Post/postinstall (revision 1586)
+++ branches/blackosx/package/Scripts/Main/Post/postinstall (revision 1587)
@@ -33,21 +33,26 @@
dest_vol="$3"
fi
-# ---------------------------------------------
-# Get location of this script so we know where
-# to find the Install Log script.
-# ---------------------------------------------
+# Where are we, so to find the Install Log script.
MYLOCATION="${PWD}/${BASH_ARGV[0]}"
export MYLOCATION="${MYLOCATION%/*}"
scriptDir=$MYLOCATION
+# Has install log already been generated?
+if [ ! -f "${dest_vol}"/.ChameleonLogFlag ]; then
+ # Write some information to the Install Log
+ versionNumber=`cat "${scriptDir}"/Resources/version`
+ revisionNumber=`cat "${scriptDir}"/Resources/revision`
+ "$scriptDir"InstallLog.sh "${dest_vol}" "Installer version: ${versionNumber} ${revisionNumber}"
+ "$scriptDir"InstallLog.sh "${dest_vol}" "Running Post postinstall script"
+ "$scriptDir"InstallLog.sh "${dest_vol}" "Target volume = ${dest_vol}"
+else
+ "$scriptDir"InstallLog.sh "${dest_vol}" "Running Post postinstall script"
+fi
+
# set temporary directory
chamTemp="$dest_vol/usr/local/chamTemp"
-# Write script information to the Install Log
-"$scriptDir"InstallLog.sh "${dest_vol}" "Running Post postinstall script"
-
-
# Check for temporary directory/Extra folder.
if [ ! -d "$chamTemp"/Extra ]; then
mkdir "$chamTemp"/Extra
@@ -91,15 +96,13 @@
ls "${chamTemp}"/options | while read FILE
do
options[arrayCount]="${FILE##*/}"
- keyRead="${options[$arrayCount]%=*}"
- value="${options[$arrayCount]#*=}"
-
+
# Check keyRead for 'KF' at beginning to
# indicate that should be a kernel flag
- if [ ${keyRead:0:2} = "KF" ];then
- kernelflag=${keyRead#*F }=$value
+ if [ ${options[arrayCount]:0:2} = "KF" ];then
+ kernelflag=${options[arrayCount]##*flag=}
sudo /usr/libexec/plistbuddy -c "Add :Kernel\ Flags string $kernelflag" "$tempOCBP"
- "$scriptDir"InstallLog.sh "${dest_vol}" "Add kernel flag: ${kernelflag}"
+ "$scriptDir"InstallLog.sh "${dest_vol}" "Added kernel flag: ${kernelflag}"
returnValue=$?
if [ ${returnValue}=1 ]; then
# Delete it for now, but need to append as more kernel flags could be added in future!!
@@ -107,11 +110,13 @@
sudo /usr/libexec/plistbuddy -c "Add :Kernel\ Flags string $kernelflag" "$tempOCBP"
fi
else
+ keyRead="${options[$arrayCount]%=*}"
+ value="${options[$arrayCount]#*=}"
# escape any spaces
keyToUse=$( echo $keyRead | sed 's/ /\\ /g' )
if [ "${keyToUse}" != "DONT" ] && [ "${value}" != "USE" ]; then
sudo /usr/libexec/plistbuddy -c "Add :${keyToUse} string ${value}" "$tempOCBP"
- "$scriptDir"InstallLog.sh "${dest_vol}" "Add boot option: ${keyRead}=${value}"
+ "$scriptDir"InstallLog.sh "${dest_vol}" "Added boot option: ${keyRead}=${value}"
fi
fi
(( arrayCount++ ))
Index: branches/blackosx/package/Scripts/Sub/InstallLog.sh
===================================================================
--- branches/blackosx/package/Scripts/Sub/InstallLog.sh (revision 1586)
+++ branches/blackosx/package/Scripts/Sub/InstallLog.sh (revision 1587)
@@ -42,17 +42,17 @@
echo "Chameleon installer log - $( date )
${verboseText}
-======================================================
-" >"${logFile}"
- diskutil list >>"${logFile}"
- echo "
-======================================================
-" >>"${logFile}"
-
+======================================================" >"${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}"
+ echo "======================================================" >>"${logFile}"
+ fi
+
if [ "${verboseText}" = "LineBreak" ]; then
echo "======================================================" >>"${logFile}"
fi
@@ -63,7 +63,7 @@
echo " " >>"${logFile}"
fi
- if [ "${verboseText}" != "LineBreak" ] && [[ "${verboseText}" != *fdisk* ]]; then
+ if [ "${verboseText}" != "LineBreak" ] && [[ "${verboseText}" != *fdisk* ]] && [[ "${verboseText}" != "Diskutil" ]]; then
echo "${verboseText}" >> "${logFile}"
fi
fi
Index: branches/blackosx/package/Resources/en.lproj/Localizable.strings
===================================================================
--- branches/blackosx/package/Resources/en.lproj/Localizable.strings (revision 1586)
+++ branches/blackosx/package/Resources/en.lproj/Localizable.strings (revision 1587)
@@ -9,7 +9,7 @@
" S t a n d a r d _ d e s c r i p t i o n " = " I n s t a l l C h a m e l e o n ' s f i l e s t o t h e r o o t o f t h e s e l e c t e d p a r t i t i o n u s i n g e i t h e r b o o t 0 o r b o o t 0 m d d e p e n d i n g o n y o u r s y s t e m w i t h o u t d e s t r o y i n g a n y e x i s t i n g W i n d o w s i n s t a l l a t i o n i f y o u h a v e o n e . " ;
" E F I _ t i t l e " = " E F I " ;
- " E F I _ d e s c r i p t i o n " = " I n s t a l l C h a m e l e o n ' s f i l e s t o t h e n o r m a l l y h i d d e n E F I p a r t i t i o n u s i n g e i t h e r b o o t 0 o r b o o t 0 m d d e p e n d i n g o n y o u r s y s t e m a n d w i t h o u t d e s t r o y i n g a n y e x i s t i n g W i n d o w s i n s t a l l a t i o n i f y o u h a v e o n e . " ;
+ " E F I _ d e s c r i p t i o n " = " I n s t a l l C h a m e l e o n ' s f i l e s t o t h e n o r m a l l y h i d d e n E F I s y s t e m p a r t i t i o n u s i n g e i t h e r b o o t 0 o r b o o t 0 m d d e p e n d i n g o n y o u r s y s t e m a n d w i t h o u t d e s t r o y i n g a n y e x i s t i n g W i n d o w s i n s t a l l a t i o n i f y o u h a v e o n e . " ;
" n o b o o t _ t i t l e " = " D o n ' t i n s t a l l t h e B o o t l o a d e r " ;
" n o b o o t _ d e s c r i p t i o n " = " U s e f u l i f y o u o n l y w a n t t o i n s t a l l t h e e x t r a ' s . " ;
@@ -71,8 +71,8 @@
" D o c u m e n t a t i o n _ d e s c r i p t i o n " = " D o c u m e n t a t i o n f o r C h a m e l e o n m a n u a l i n s t a l l a n d u s e " ;
/ / B o o t O p t i o n s
- " O p t i o n s _ t i t l e " = " B o o t O p t i o n s " ;
- " O p t i o n s _ d e s c r i p t i o n " = " C r e a t e a n / E x t r a / o r g . c h a m e l e o n . B o o t . p l i s t a n d s e l e c t y o u r d e s i r e d o p t i o n s t o c o n t r o l C h a m e l e o n ' s s e t t i n g s . " ;
+ " O p t i o n s _ t i t l e " = " A v a i l a b l e S e t t i n g s " ;
+ " O p t i o n s _ d e s c r i p t i o n " = " C r e a t e a n / E x t r a / o r g . c h a m e l e o n . B o o t . p l i s t b y s e l e c t i n g a n y o f t h e s e b o o t o p t i o n s a n d k e r n e l f l a g s . " ;
/ / C o n t r o l
Index: branches/blackosx/package/buildpkg.sh
===================================================================
--- branches/blackosx/package/buildpkg.sh (revision 1586)
+++ branches/blackosx/package/buildpkg.sh (revision 1587)
@@ -296,6 +296,8 @@
mkdir -p ${1}/Post/Scripts
cp -f ${pkgroot}/Scripts/Main/Post/* ${1}/Post/Scripts
cp -f ${pkgroot}/Scripts/Sub/InstallLog.sh ${1}/Post/Scripts
+ ditto --noextattr --noqtn ${1%/*/*}/revision ${1}/Post/Scripts/Resources/revision
+ ditto --noextattr --noqtn ${1%/*/*}/version ${1}/Post/Scripts/Resources/version
echo " [BUILD] Post "
buildpackage "${1}/Post" "/" "" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1
outline[$((outlinecount++))]="${indent[$xmlindent]}"
@@ -306,7 +308,7 @@
# clean up
- rm -R -f "${1}"
+ #rm -R -f "${1}"
}
@@ -426,7 +428,7 @@
header+="auth=\"root\">\n"
header+="\t\n"
- rm -R -f "${1}/Temp"
+ #rm -R -f "${1}/Temp"
[ -d "${1}/Temp" ] || mkdir -m 777 "${1}/Temp"
[ -d "${1}/Root" ] && mkbom "${1}/Root" "${1}/Temp/Bom"
@@ -463,7 +465,7 @@
fi
choices[$((choicescount++))]="\n\t#${packagename// /}.pkg\n\n"
- rm -R -f "${1}"
+ #rm -R -f "${1}"
fi
}