Compare commits

...

3 Commits

Author SHA1 Message Date
bin456789
c6000c16ab core: 修复在 windows 下打包 initramfs 时, 修改了 rdisc6 的 owner 导致 rdisc6 无法运行
造成 ipv6 统一配置成静态

> rdisc6 ens5
Raw IPv6 socket: Operation not permitted

> ls -l /usr/bin/rdisc6
-rwsr-xr-x 1 197108 197121 26648 Jan 14 2024 /usr/bin/rdisc6
2026-03-15 23:43:52 +08:00
bin456789
8dd873d7dd core: 将 grep --text 改成 -a
避免脚本早期运行时在 alpine 下报错
2026-03-15 23:32:51 +08:00
bin456789
41c4df9fdb windows: 修复 image-name 有特殊符号时出错
fixes #575
2026-03-15 17:19:22 +08:00
2 changed files with 7 additions and 7 deletions

View File

@@ -2321,7 +2321,7 @@ check_ram() {
is_efi() {
if is_in_windows; then
# bcdedit | grep -qi '^path.*\.efi'
mountvol | grep -q --text 'EFI'
mountvol | grep -q -a 'EFI'
else
[ -d /sys/firmware/efi ]
fi
@@ -2372,7 +2372,7 @@ is_use_local_extlinux() {
is_mbr_using_grub() {
find_main_disk
# 各发行版不一定自带 strings hexdump xxd od 命令
head -c 440 /dev/$xda | grep --text -iq 'GRUB'
head -c 440 /dev/$xda | grep -a -iq 'GRUB'
}
to_upper() {
@@ -3116,7 +3116,7 @@ install_grub_win() {
# 添加引导
# 脚本可能不是首次运行,所以先删除原来的
id='{1c41f649-1637-52f1-aea8-f96bfebeecc8}'
bcdedit /enum all | grep --text $id && bcdedit /delete $id
bcdedit /enum all | grep -a $id && bcdedit /delete $id
bcdedit /create $id /d "$(get_entry_name)" /application bootsector
bcdedit /set $id device partition=$c:
bcdedit /set $id path \\g2ldr
@@ -3918,7 +3918,7 @@ This script is outdated, please download reinstall.sh again.
# -c Identical to "-H newc", use the new (SVR4)
# portable format.If you wish the old portable
# (ASCII) archive format, use "-H odc" instead.
find . | cpio --quiet -o -H newc | gzip -1 >/reinstall-initrd
find . | cpio --quiet -o -H newc -R 0:0 | gzip -1 >/reinstall-initrd
cd - >/dev/null
}
@@ -4200,12 +4200,12 @@ remove_exist_reinstall() {
remove_exist_reinstall_efi_dir
bcdedit /set '{fwbootmgr}' bootsequence '{bootmgr}'
bcdedit /enum bootmgr | grep --text -B3 'reinstall' | awk '{print $2}' | grep '{.*}' |
bcdedit /enum bootmgr | grep -a -B3 'reinstall' | awk '{print $2}' | grep '{.*}' |
xargs -I {} cmd /c bcdedit /delete {}
else
# bios
id='{1c41f649-1637-52f1-aea8-f96bfebeecc8}'
if bcdedit /enum all | grep --text "$id"; then
if bcdedit /enum all | grep -a "$id"; then
bcdedit /delete "$id"
fi
fi

View File

@@ -5852,7 +5852,7 @@ install_windows() {
while true; do
# 匹配成功
# 改成正确的大小写
if matched_image_name=$(echo "$all_image_names" | grep -ix "$image_name"); then
if matched_image_name=$(printf '%s\n' "$all_image_names" | grep -Fix "$image_name"); then
image_name=$matched_image_name
image_index=$(wiminfo "$iso_install_wim" "$image_name" | grep 'Index:' | awk '{print $NF}')
break