提交 11436b25 编写于 作者: M Mike Beaton

LogoutHook: Improve logging resilience

上级 f6184144
......@@ -2,6 +2,7 @@ OpenCore Changelog
==================
#### v0.9.9
- Fixed incorrect warning in ocvalidate
- Improved NVRAM `Launchd.command` logging resilience for logout hook and daemon
#### v0.9.8
- Updated OpenDuet to allow loading unsigned, unaligned legacy Apple images such as HfsPlusLegacy.efi
......
......@@ -35,6 +35,11 @@ usage() {
}
doLog() {
# macOS recreats this for daemon at reboot, but preferable
# to continue logging immediately after any log cleardown,
# also never recreated except for this with logout hook
sudo mkdir -p "${LOGDIR}"
# 'sudo tee' to write to log file as root (could also 'sh -c') for installation steps;
# will be root anyway when running installed as daemon or logout hook
if [ ! "${LOG_PREFIX}" = "" ] ; then
......@@ -74,6 +79,8 @@ getDarwinMajorVersion() {
installLog() {
FAIL="Failed to install log!"
if [ ! -d "${LOGDIR}" ] ; then
# We intentionally don't use -p as something is probably
# weird if parent dirs don't exist here
sudo mkdir "${LOGDIR}" || abort "${FAIL}"
fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册