From d61632a8d55e9d9240f9d6decf6f650aec17b896 Mon Sep 17 00:00:00 2001 From: TADAYUKI ONISHI Date: Sat, 13 Apr 2019 23:53:09 +0900 Subject: [PATCH 1/2] Trim spaces with eraseInstall in logging. --- macOSUpgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macOSUpgrade.sh b/macOSUpgrade.sh index 54077d5..1c390da 100755 --- a/macOSUpgrade.sh +++ b/macOSUpgrade.sh @@ -412,7 +412,7 @@ fi ##Check if eraseInstall is Enabled if [[ $eraseInstall == 1 ]]; then eraseopt='--eraseinstall' - /bin/echo " Script is configured for Erase and Install of macOS." + /bin/echo "Script is configured for Erase and Install of macOS." fi osinstallLogfile="/var/log/startosinstall.log" From e5e180c487a43012d72c42e825a2b5aa3735aaed Mon Sep 17 00:00:00 2001 From: TADAYUKI ONISHI Date: Sat, 13 Apr 2019 23:55:51 +0900 Subject: [PATCH 2/2] Standard error output will be also recorded in the osinstaller log file --- macOSUpgrade.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macOSUpgrade.sh b/macOSUpgrade.sh index 1c390da..3bb6e24 100755 --- a/macOSUpgrade.sh +++ b/macOSUpgrade.sh @@ -417,9 +417,9 @@ fi osinstallLogfile="/var/log/startosinstall.log" if [ "$versionMajor" -ge 14 ]; then - eval "\"$OSInstaller/Contents/Resources/startosinstall\"" "$eraseopt" --agreetolicense --nointeraction --pidtosignal "$jamfHelperPID" >> "$osinstallLogfile" & + eval "\"$OSInstaller/Contents/Resources/startosinstall\"" "$eraseopt" --agreetolicense --nointeraction --pidtosignal "$jamfHelperPID" >> "$osinstallLogfile" 2>&1 & else - eval "\"$OSInstaller/Contents/Resources/startosinstall\"" "$eraseopt" --applicationpath "\"$OSInstaller\"" --agreetolicense --nointeraction --pidtosignal "$jamfHelperPID" >> "$osinstallLogfile" & + eval "\"$OSInstaller/Contents/Resources/startosinstall\"" "$eraseopt" --applicationpath "\"$OSInstaller\"" --agreetolicense --nointeraction --pidtosignal "$jamfHelperPID" >> "$osinstallLogfile" 2>&1 & fi /bin/sleep 3