Chameleon

Chameleon Svn Source Tree

Root/tags/2.1/package/Scripts.templates/InstallerLog/InstallLog.sh

  • Property svn:executable set to *
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
14if [ "$#" -eq 2 ]; then
15logLocation="$1"
16verboseText="$2"
17#echo "DEBUG: passed argument = ${logLocation}"
18#echo "DEBUG: passed argument = ${verboseText}"
19else
20echo "InstallLog: Error - wrong number of values passed"
21exit 9
22fi
23
24logName="@LOG_FILENAME@"
25logFile="${logLocation}"/$logName
26
27if [ -f "${logFile}" ]; then
28
29# Append messages to the log as passed by other scripts.
30if [ "${verboseText}" = "Diskutil" ]; then
31diskutil list >>"${logFile}"
32echo "======================================================" >>"${logFile}"
33fi
34
35if [ "${verboseText}" = "LineBreak" ]; then
36echo "======================================================" >>"${logFile}"
37fi
38
39if [[ "${verboseText}" == *fdisk* ]]; then
40targetDiskRaw="${verboseText#fdisk *}"
41fdisk $targetDiskRaw >>"${logFile}"
42echo " " >>"${logFile}"
43fi
44
45if [ "${verboseText}" != "LineBreak" ] && [[ "${verboseText}" != *fdisk* ]] && [[ "${verboseText}" != "Diskutil" ]]; then
46echo "${verboseText}" >> "${logFile}"
47fi
48fi
49
50exit 0
51

Archive Download this file

Revision: 2381