Root/
| |
---|---|
Source at commit 2381 created 10 years 21 days ago. By ifabio, Apply patch: (Credits to Thomas Jansen aka tja) - Reading options from all devices during boot. The options for the boot menu are only read from the devices rd(0,0) or bt(0,0). Consequently, boot menu options (e.g. "Quiet Boot", "Timeout", etc.) in plists on other devices (like most users have) are ignored. This patch extends the list of paths to search for the options plist on all devices that can be found. | |
1 | #!/bin/bash␊ |
2 | ␊ |
3 | #echo "==============================================="␊ |
4 | #echo "InstallLog: Create/Append installation log"␊ |
5 | #echo "**********************************************"␊ |
6 | ␊ |
7 | # Writes to the @LOG_FILENAME@ file created␊ |
8 | # by the preinstall script at the start of installation.␊ |
9 | ␊ |
10 | # Receives two parameters␊ |
11 | # $1 = selected volume for location of the install log␊ |
12 | # $2 = text to write to the installer log␊ |
13 | ␊ |
14 | if [ "$#" -eq 2 ]; then␊ |
15 | ␉logLocation="$1"␊ |
16 | ␉verboseText="$2"␊ |
17 | ␉#echo "DEBUG: passed argument = ${logLocation}"␊ |
18 | ␉#echo "DEBUG: passed argument = ${verboseText}"␊ |
19 | else␊ |
20 | ␉echo "InstallLog: Error - wrong number of values passed"␊ |
21 | ␉exit 9␊ |
22 | fi␊ |
23 | ␊ |
24 | logName="@LOG_FILENAME@"␊ |
25 | logFile="${logLocation}"/$logName␊ |
26 | ␊ |
27 | if [ -f "${logFile}" ]; then␊ |
28 | ␊ |
29 | ␉# Append messages to the log as passed by other scripts.␊ |
30 | ␉if [ "${verboseText}" = "Diskutil" ]; then␊ |
31 | ␉␉diskutil list >>"${logFile}"␊ |
32 | ␉echo "======================================================" >>"${logFile}"␊ |
33 | ␉fi␊ |
34 | ␊ |
35 | ␉if [ "${verboseText}" = "LineBreak" ]; then␊ |
36 | ␉␉echo "======================================================" >>"${logFile}"␊ |
37 | ␉fi␊ |
38 | ␊ |
39 | ␉if [[ "${verboseText}" == *fdisk* ]]; then␊ |
40 | ␉␉targetDiskRaw="${verboseText#fdisk *}"␊ |
41 | ␉␉fdisk $targetDiskRaw >>"${logFile}"␊ |
42 | ␉␉echo " " >>"${logFile}"␊ |
43 | ␉fi␊ |
44 | ␊ |
45 | ␉if [ "${verboseText}" != "LineBreak" ] && [[ "${verboseText}" != *fdisk* ]] && [[ "${verboseText}" != "Diskutil" ]]; then␊ |
46 | ␉␉echo "${verboseText}" >> "${logFile}"␊ |
47 | ␉fi␊ |
48 | fi␊ |
49 | ␊ |
50 | exit 0␊ |
51 |