tree: fix more syntax

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-09-17 18:56:39 +02:00
parent 430f31edcc
commit 20d65f42e9
5 changed files with 18 additions and 18 deletions

View File

@ -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
(

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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)"