mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-23 22:29:54 +07:00
commit
11cbf15da1
@ -1496,7 +1496,7 @@ function staticIPMenu() {
|
||||
for ETH in ${ETHX}; do
|
||||
MACR="$(cat /sys/class/net/${ETH}/address 2>/dev/null | sed 's/://g' | tr '[:lower:]' '[:upper:]')"
|
||||
IPR="$(readConfigKey "network.${MACR}" "${USER_CONFIG_FILE}")"
|
||||
IFS='/' read -r -a IPRA <<<"$IPR"
|
||||
IFS='/' read -r -a IPRA <<<"${IPR}"
|
||||
|
||||
MSG="$(printf "Set to %s: (Delete if empty)" "${ETH}(${MACR})")"
|
||||
while true; do
|
||||
@ -1538,7 +1538,7 @@ function staticIPMenu() {
|
||||
MACR="$(cat /sys/class/net/${ETH}/address 2>/dev/null | sed 's/://g' | tr '[:lower:]' '[:upper:]')"
|
||||
IPR="$(readConfigKey "network.${MACR}" "${USER_CONFIG_FILE}")"
|
||||
if [ -n "${IPR}" ]; then
|
||||
IFS='/' read -r -a IPRA <<<"$IPR"
|
||||
IFS='/' read -r -a IPRA <<<"${IPR}"
|
||||
ip addr flush dev ${ETH}
|
||||
ip addr add ${IPRA[0]}/${IPRA[1]:-"255.255.255.0"} dev ${ETH}
|
||||
[ -z "${IPCON}" ] && IPCON="${IPRA[0]}"
|
||||
@ -1745,9 +1745,9 @@ function formatDisks() {
|
||||
rm -f "${TMP_PATH}/opts"
|
||||
while read -r KNAME SIZE TYPE PKNAME; do
|
||||
[ -z "${KNAME}" ] && continue
|
||||
[ "${KNAME}" = "N/A" ] && continue
|
||||
[[ "${KNAME}" = /dev/md* ]] && continue
|
||||
[[ "${KNAME}" = "${LOADER_DISK}" || "${PKNAME}" = "${LOADER_DISK}" ]] && continue
|
||||
[ "${KNAME}" == "N/A" ] && continue
|
||||
[[ "${KNAME}" == /dev/md* ]] && continue
|
||||
[[ "${KNAME}" == "${LOADER_DISK}" || "${PKNAME}" == "${LOADER_DISK}" ]] && continue
|
||||
[ -z "${SIZE}" ] && SIZE="Unknown"
|
||||
printf "\"%s\" \"%-6s %-4s %s\" \"off\"\n" "${KNAME}" "${SIZE}" "${TYPE}" >>"${TMP_PATH}/opts"
|
||||
done < <(lsblk -Jpno KNAME,SIZE,TYPE,PKNAME 2>/dev/null | sed 's|null|"N/A"|g' | jq -r '.blockdevices[] | "\(.kname) \(.size) \(.type) \(.pkname)"' 2>/dev/null)
|
||||
@ -1847,10 +1847,10 @@ function cloneLoader() {
|
||||
rm -f "${TMP_PATH}/opts" >/dev/null
|
||||
while read -r KNAME SIZE TYPE PKNAME; do
|
||||
[ -z "${KNAME}" ] && continue
|
||||
[ "${KNAME}" = "N/A" ] && continue
|
||||
[ "${KNAME}" == "N/A" ] && continue
|
||||
[ "${TYPE}" != "disk" ] && continue
|
||||
[[ "${KNAME}" = /dev/md* ]] && continue
|
||||
[[ "${KNAME}" = "${LOADER_DISK}" || "${PKNAME}" = "${LOADER_DISK}" ]] && continue
|
||||
[[ "${KNAME}" == /dev/md* ]] && continue
|
||||
[[ "${KNAME}" == "${LOADER_DISK}" || "${PKNAME}" == "${LOADER_DISK}" ]] && continue
|
||||
[ -z "${SIZE}" ] && SIZE="Unknown"
|
||||
printf "\"%s\" \"%-6s %-4s %s\" \"off\"\n" "${KNAME}" "${SIZE}" "${TYPE}" >>"${TMP_PATH}/opts"
|
||||
done < <(lsblk -Jpno KNAME,SIZE,TYPE,PKNAME 2>/dev/null | sed 's|null|"N/A"|g' | jq -r '.blockdevices[] | "\(.kname) \(.size) \(.type) \(.pkname)"' 2>/dev/null)
|
||||
@ -2069,7 +2069,7 @@ function satadomMenu() {
|
||||
# Decrypt Menu
|
||||
function decryptMenu() {
|
||||
OFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
|
||||
if [ "${OFFLINE}" = "false" ]; then
|
||||
if [ "${OFFLINE}" == "false" ]; then
|
||||
local TAG="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-configs/releases" | jq -r ".[].tag_name" | sort -rV | head -1)"
|
||||
if [ -n "${TAG}" ]; then
|
||||
(
|
||||
|
@ -101,8 +101,8 @@ function arcModel() {
|
||||
fi
|
||||
echo -n "" >"${TMP_PATH}/modellist"
|
||||
echo "${MJ}" | jq -c '.[]' | while read -r item; do
|
||||
name=$(echo "$item" | jq -r '.name')
|
||||
arch=$(echo "$item" | jq -r '.arch')
|
||||
name=$(echo "${item}" | jq -r '.name')
|
||||
arch=$(echo "${item}" | jq -r '.arch')
|
||||
echo "${name} ${arch}" >>"${TMP_PATH}/modellist"
|
||||
done
|
||||
if [ "${AUTOMATED}" == "false" ]; then
|
||||
@ -140,7 +140,7 @@ function arcModel() {
|
||||
if [ "${A}" != "epyc7002" ] && [ ${SATACONTROLLER} -eq 0 ] && [ "${EXTERNALCONTROLLER}" == "false" ]; then
|
||||
COMPATIBLE=0
|
||||
fi
|
||||
if [ "${A}" = "epyc7002" ] && [[ ${SCSICONTROLLER} -ne 0 || ${RAIDCONTROLLER} -ne 0 ]]; then
|
||||
if [ "${A}" == "epyc7002" ] && [[ ${SCSICONTROLLER} -ne 0 || ${RAIDCONTROLLER} -ne 0 ]]; then
|
||||
COMPATIBLE=0
|
||||
fi
|
||||
if [ "${A}" != "epyc7002" ] && [ ${NVMEDRIVES} -gt 0 ] && [ "${BUS}" == "usb" ] && [ ${SATADRIVES} -eq 0 ] && [ "${EXTERNALCONTROLLER}" == "false" ]; then
|
||||
@ -281,7 +281,7 @@ function arcVersion() {
|
||||
URLVER=""
|
||||
while true; do
|
||||
PJ="$(python ${ARC_PATH}/include/functions.py getpats4mv -m "${MODEL}" -v "${PRODUCTVER}")"
|
||||
if [[ -z "${PJ}" || "${PJ}" = "{}" ]]; then
|
||||
if [[ -z "${PJ}" || "${PJ}" == "{}" ]]; then
|
||||
MSG="Unable to connect to Synology API, Please check the network and try again!"
|
||||
dialog --backtitle "$(backtitle)" --colors --title "DSM Version" \
|
||||
--yes-label "Retry" \
|
||||
@ -900,7 +900,7 @@ else
|
||||
[ "${BUILDDONE}" == "true" ] && NEXT="3" || NEXT="1"
|
||||
while true; do
|
||||
echo "= \"\Z4========== Main ==========\Zn \" " >"${TMP_PATH}/menu"
|
||||
if [ -z "${ARCKEY}" ] && [ "${OFFLINE}" = "false" ]; then
|
||||
if [ -z "${ARCKEY}" ] && [ "${OFFLINE}" == "false" ]; then
|
||||
echo "0 \"Enable Arc Patch\" " >>"${TMP_PATH}/menu"
|
||||
fi
|
||||
echo "1 \"Choose Model \" " >>"${TMP_PATH}/menu"
|
||||
|
@ -11,7 +11,7 @@ rm -rf "${PART1_PATH}/logs" >/dev/null 2>&1 || true
|
||||
rm -rf /sys/fs/pstore/* >/dev/null 2>&1 || true
|
||||
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
[ "${BUILDDONE}" = "false" ] && die "Loader build not completed!"
|
||||
[ "${BUILDDONE}" == "false" ] && die "Loader build not completed!"
|
||||
ARCBRANCH="$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
|
||||
|
||||
# Get Loader Disk Bus
|
||||
@ -86,7 +86,7 @@ if ! readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q nvmesystem; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
[ ${HASATA} = "0" ] && echo -e "\033[1;31m*** Please insert at least one Sata/SAS/SCSI Disk for System installation, except for the Bootloader Disk. ***\033[0m"
|
||||
[ ${HASATA} -eq 0 ] && echo -e "\033[1;31m*** Please insert at least one Sata/SAS/SCSI Disk for System installation, except for the Bootloader Disk. ***\033[0m"
|
||||
fi
|
||||
|
||||
# Read necessary variables
|
||||
@ -163,13 +163,13 @@ CMDLINE['modprobe.blacklist']="${MODBLACKLIST}"
|
||||
|
||||
#if [ -n "$(ls /dev/mmcblk* 2>/dev/null)" ] && [ "${BUS}" != "mmc" ] && [ "${EMMCBOOT}" != "true" ]; then
|
||||
# if ! echo "${CMDLINE['modprobe.blacklist']}" | grep -q "sdhci"; then
|
||||
# [ ! "${CMDLINE['modprobe.blacklist']}" = "" ] && CMDLINE['modprobe.blacklist']+=","
|
||||
# [ ! "${CMDLINE['modprobe.blacklist']}" == "" ] && CMDLINE['modprobe.blacklist']+=","
|
||||
# CMDLINE['modprobe.blacklist']+="sdhci,sdhci_pci,sdhci_acpi"
|
||||
# fi
|
||||
# fi
|
||||
if [ "${DT}" == "true" ] && ! echo "epyc7002 purley broadwellnkv2" | grep -wq "${PLATFORM}"; then
|
||||
if ! echo "${CMDLINE['modprobe.blacklist']}" | grep -q "mpt3sas"; then
|
||||
[ ! "${CMDLINE['modprobe.blacklist']}" = "" ] && CMDLINE['modprobe.blacklist']+=","
|
||||
[ ! "${CMDLINE['modprobe.blacklist']}" == "" ] && CMDLINE['modprobe.blacklist']+=","
|
||||
CMDLINE['modprobe.blacklist']+="mpt3sas"
|
||||
fi
|
||||
fi
|
||||
|
@ -647,7 +647,7 @@ function updateLKMs() {
|
||||
# Update Failed
|
||||
function updateFailed() {
|
||||
local AUTOMATED="$(readConfigKey "automated" "${USER_CONFIG_FILE}")"
|
||||
if [ "${AUTOMATED}" = "true" ]; then
|
||||
if [ "${AUTOMATED}" == "true" ]; then
|
||||
echo "Update failed!"
|
||||
sleep 5
|
||||
exec reboot
|
||||
@ -660,7 +660,7 @@ function updateFailed() {
|
||||
|
||||
function updateFaileddialog() {
|
||||
local AUTOMATED="$(readConfigKey "automated" "${USER_CONFIG_FILE}")"
|
||||
if [ "${AUTOMATED}" = "true" ]; then
|
||||
if [ "${AUTOMATED}" == "true" ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Update Failed" \
|
||||
--infobox "Update failed!" 0 0
|
||||
sleep 5
|
||||
|
@ -106,7 +106,7 @@ for ETH in ${ETHX}; do
|
||||
MACR="$(cat /sys/class/net/${ETH}/address 2>/dev/null | sed 's/://g' | tr '[:lower:]' '[:upper:]')"
|
||||
IPR="$(readConfigKey "network.${MACR}" "${USER_CONFIG_FILE}")"
|
||||
if [ -n "${IPR}" ]; then
|
||||
IFS='/' read -r -a IPRA <<<"$IPR"
|
||||
IFS='/' read -r -a IPRA <<<"${IPR}"
|
||||
ip addr flush dev ${ETH}
|
||||
ip addr add ${IPRA[0]}/${IPRA[1]:-"255.255.255.0"} dev ${ETH}
|
||||
if [ -n "${IPRA[2]}" ]; then
|
||||
@ -118,8 +118,8 @@ for ETH in ${ETHX}; do
|
||||
fi
|
||||
sleep 1
|
||||
fi
|
||||
[ "${ETH::3}" = "eth" ] && ethtool -s ${ETH} wol g 2>/dev/null || true
|
||||
# [ "${ETH::3}" = "eth" ] && ethtool -K ${ETH} rxhash off 2>/dev/null || true
|
||||
[ "${ETH::3}" == "eth" ] && ethtool -s ${ETH} wol g 2>/dev/null || true
|
||||
# [ "${ETH::3}" == "eth" ] && ethtool -K ${ETH} rxhash off 2>/dev/null || true
|
||||
initConfigKey "${ETH}" "${MACR}" "${USER_CONFIG_FILE}"
|
||||
done
|
||||
ETHN="$(echo ${ETHX} | wc -w)"
|
||||
|
Loading…
Reference in New Issue
Block a user