alpine: 修复旧机器无法加载 crc32c 导致安装失败

This commit is contained in:
bin456789 2024-04-04 19:13:54 +08:00
parent f037751cf5
commit ef16d20a44
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -712,10 +712,13 @@ install_alpine() {
if $hack_lowram_modloop; then
# 预先加载需要的模块
if rc-service modloop status; then
modules="ext4 vfat nls_utf8 nls_cp437 crc32c"
modules="ext4 vfat nls_utf8 nls_cp437"
for mod in $modules; do
modprobe $mod
done
# crc32c 等于 crc32c-intel
# 没有 sse4.2 的机器加载 crc32c 时会报错 modprobe: ERROR: could not insert 'crc32c_intel': No such device
modprobe crc32c || modprobe crc32c-generic
fi
# 删除 modloop ,释放内存