1 Star 0 Fork 1

hooliganlee/rr

forked from weenworld/rr 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
update-check.sh 1.84 KB
一键复制 编辑 原始数据 按行查看 历史
Ccing 提交于 2023-10-05 15:58 . fix something
#!/usr/bin/env bash
# 23.5.0
[ ! -f /mnt/p1/boot/grub/grub.cfg ] && exit 1
# 23.7.0
. /opt/arpl/include/functions.sh
if loaderIsConfigured; then
if [ -f "${ORI_RDGZ_FILE}" ]; then
rm -rf "${RAMDISK_PATH}"
mkdir -p "${RAMDISK_PATH}"
(
cd "${RAMDISK_PATH}"
xz -dc <"${ORI_RDGZ_FILE}" | cpio -idm
) >/dev/null 2>&1
. "${RAMDISK_PATH}/etc/VERSION"
[ -n "$(readConfigKey "build" "${USER_CONFIG_FILE}")" ] && deleteConfigKey "build" "${USER_CONFIG_FILE}"
[ -n "$(readConfigKey "smallfixnumber" "${USER_CONFIG_FILE}")" ] && deleteConfigKey "smallfixnumber" "${USER_CONFIG_FILE}"
[ -z "$(readConfigKey "paturl" "${USER_CONFIG_FILE}")" ] && writeConfigKey "paturl" "" "${USER_CONFIG_FILE}"
[ -z "$(readConfigKey "patsum" "${USER_CONFIG_FILE}")" ] && writeConfigKey "patsum" "" "${USER_CONFIG_FILE}"
[ -z "$(readConfigKey "productver" "${USER_CONFIG_FILE}")" ] && writeConfigKey "productver" "${majorversion}.${minorversion}" "${USER_CONFIG_FILE}"
[ -z "$(readConfigKey "buildnum" "${USER_CONFIG_FILE}")" ] && writeConfigKey "buildnum" "${buildnumber}" "${USER_CONFIG_FILE}"
[ -z "$(readConfigKey "smallnum" "${USER_CONFIG_FILE}")" ] && writeConfigKey "smallnum" "${smallfixnumber}" "${USER_CONFIG_FILE}"
fi
fi
# 23.9.7
MAC1="$(readConfigKey "cmdline.mac1" "${USER_CONFIG_FILE}")"
deleteConfigKey "notsetmacs" "${USER_CONFIG_FILE}"
for N in $(1 8); do
deleteConfigKey "cmdline.mac${N}" "${USER_CONFIG_FILE}"
deleteConfigKey "original-mac${N}" "${USER_CONFIG_FILE}"
done
deleteConfigKey "cmdline.netif_num" "${USER_CONFIG_FILE}"
[ -n "${MAC1}" ] && writeConfigKey "mac1" "${MAC1}" "${USER_CONFIG_FILE}"
MAC1="$(readConfigKey "mac1" "${USER_CONFIG_FILE}")"
[ -z "${MAC1}" ] && writeConfigKey "mac1" "001132$(printf '%02x%02x%02x' $((${RANDOM} % 256)) $((${RANDOM} % 256)) $((${RANDOM} % 256)))" "${USER_CONFIG_FILE}"
exit 0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hooliganlee_admin/rr.git
git@gitee.com:hooliganlee_admin/rr.git
hooliganlee_admin
rr
rr
arpl-i18n

搜索帮助

0d507c66 1850385 C8b1a773 1850385