Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
b2a1dadd
O
OpenCorePKG_MOD
项目概览
btwise
/
OpenCorePKG_MOD
通知
26
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
OpenCorePKG_MOD
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b2a1dadd
编写于
6月 26, 2020
作者:
R
Rodion Shingarev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improved boot selection scripts for macOS without NVRAM
上级
533a9693
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
14 deletion
+8
-14
Utilities/LogoutHook/LogoutHook.command
Utilities/LogoutHook/LogoutHook.command
+8
-14
未找到文件。
Utilities/LogoutHook/LogoutHook.command
浏览文件 @
b2a1dadd
...
@@ -13,7 +13,7 @@ if [ "$1" = "install" ]; then
...
@@ -13,7 +13,7 @@ if [ "$1" = "install" ]; then
exit
0
exit
0
fi
fi
if
[
!
-x
/usr/bin/dirname
]
||
[
!
-x
/usr/sbin/nvram
]
||
[
!
-x
/usr/bin/grep
]
||
[
!
-x
/bin/chmod
]
||
[
!
-x
/usr/bin/sed
]
||
[
!
-x
/usr/bin/base64
]
||
[
!
-x
/bin/rm
]
||
[
!
-x
/bin/mkdir
]
||
[
!
-x
/bin/dd
]
||
[
!
-x
/usr/bin/stat
]
||
[
!
-x
/usr/libexec/PlistBuddy
]
||
[
!
-x
/usr/sbin/ioreg
]
||
[
!
-x
/usr/bin/xxd
]
||
[
!
-x
/usr/sbin/diskutil
]
||
[
!
-x
/bin/cp
]
||
[
!
-x
/usr/bin/wc
]
||
[
!
-x
/usr/bin/uuidgen
]
||
[
!
-x
/usr/bin/hexdump
]
;
then
if
[
!
-x
/usr/bin/dirname
]
||
[
!
-x
/usr/sbin/nvram
]
||
[
!
-x
/usr/bin/grep
]
||
[
!
-x
/bin/chmod
]
||
[
!
-x
/usr/bin/sed
]
||
[
!
-x
/usr/bin/base64
]
||
[
!
-x
/bin/rm
]
||
[
!
-x
/bin/mkdir
]
||
[
!
-x
/usr/bin/stat
]
||
[
!
-x
/usr/libexec/PlistBuddy
]
||
[
!
-x
/usr/sbin/ioreg
]
||
[
!
-x
/usr/bin/xxd
]
||
[
!
-x
/usr/sbin/diskutil
]
||
[
!
-x
/bin/cp
]
||
[
!
-x
/usr/bin/wc
]
||
[
!
-x
/usr/bin/uuidgen
]
||
[
!
-x
/usr/bin/hexdump
]
;
then
abort
"Unix environment is broken!"
abort
"Unix environment is broken!"
fi
fi
...
@@ -53,14 +53,8 @@ cd "${uuidDump}" || abort "Failed to enter dump directory!"
...
@@ -53,14 +53,8 @@ cd "${uuidDump}" || abort "Failed to enter dump directory!"
"
${
nvram
}
"
-xp
>
./nvram1.plist
||
abort
"Failed to dump nvram!"
"
${
nvram
}
"
-xp
>
./nvram1.plist
||
abort
"Failed to dump nvram!"
getKey
"8BE4DF61-93CA-11D2-AA0D-00E098032B8C:Boot0080"
>
Boot0080
getKey
"efi-boot-device-data"
>
efi-boot-device-data
if
[
-n
"
$(
/usr/bin/hexdump
"Boot0080"
)
"
]
&&
[
-n
"
$(
/usr/bin/hexdump
"efi-boot-device-data"
)
"
]
;
then
/bin/dd
seek
=
24
if
=
efi-boot-device-data
of
=
Boot0080
bs
=
1
count
=
"
$(
/usr/bin/stat
-f
%z efi-boot-device-data
)
"
||
abort
"Failed to fill Boot0080 with efi-boot-device-data!"
/usr/libexec/PlistBuddy
-c
"Import Add:8BE4DF61-93CA-11D2-AA0D-00E098032B8C:Boot0080 Boot0080"
./nvram.plist
||
abort
"Failed to import Boot0080!"
fi
for
key
in
BootOrder BootNext Boot0081 Boot0082 Boot0083
;
do
for
key
in
BootOrder BootNext Boot008
0 Boot008
1 Boot0082 Boot0083
;
do
getKey
"8BE4DF61-93CA-11D2-AA0D-00E098032B8C:
${
key
}
"
>
"
${
key
}
"
getKey
"8BE4DF61-93CA-11D2-AA0D-00E098032B8C:
${
key
}
"
>
"
${
key
}
"
if
[
-n
"
$(
/usr/bin/hexdump
"
${
key
}
"
)
"
]
;
then
if
[
-n
"
$(
/usr/bin/hexdump
"
${
key
}
"
)
"
]
;
then
/usr/libexec/PlistBuddy
-c
"Import Add:8BE4DF61-93CA-11D2-AA0D-00E098032B8C:
${
key
}
${
key
}
"
./nvram.plist
||
abort
"Failed to import
${
key
}
from 8BE4DF61-93CA-11D2-AA0D-00E098032B8C!"
/usr/libexec/PlistBuddy
-c
"Import Add:8BE4DF61-93CA-11D2-AA0D-00E098032B8C:
${
key
}
${
key
}
"
./nvram.plist
||
abort
"Failed to import
${
key
}
from 8BE4DF61-93CA-11D2-AA0D-00E098032B8C!"
...
@@ -68,12 +62,12 @@ for key in BootOrder BootNext Boot0081 Boot0082 Boot0083; do
...
@@ -68,12 +62,12 @@ for key in BootOrder BootNext Boot0081 Boot0082 Boot0083; do
done
done
# not an error
# not an error
# shellcheck disable=SC2043
# shellcheck disable=SC2043
for
key
in
DefaultBackgroundColor
;
do
#
for key in DefaultBackgroundColor; do
getKey
"4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:
${
key
}
"
>
"
${
key
}
"
#
getKey "4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:${key}" > "${key}"
if
[
-n
"
$(
/usr/bin/hexdump
"
${
key
}
"
)
"
]
;
then
#
if [ -n "$(/usr/bin/hexdump "${key}" )" ]; then
/usr/libexec/PlistBuddy
-c
"Import Add:4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:
${
key
}
${
key
}
"
./nvram.plist
||
abort
"Failed to import
${
key
}
from 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14!"
#
/usr/libexec/PlistBuddy -c "Import Add:4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:${key} ${key}" ./nvram.plist || abort "Failed to import ${key} from 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14!"
fi
#
fi
done
#
done
# Optional for security reasons: Wi-Fi settings for Install OS X and Recovery
# Optional for security reasons: Wi-Fi settings for Install OS X and Recovery
# for key in current-network preferred-count; do
# for key in current-network preferred-count; do
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录