Skip to content

Commit

Permalink
Merge pull request #77 from AuxXxilium/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
AuxXxilium committed Mar 29, 2024
2 parents 38b7949 + 71f944d commit bbc7e3e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
50 changes: 25 additions & 25 deletions files/initrd/opt/arc/arc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,34 +102,34 @@ function updateMenu() {
fi
if [ "${ACTUALVERSION}" = "${TAG}" ]; then
arcModel
exit 0
fi
dialog --backtitle "$(backtitle)" --title "Upgrade Loader" --aspect 18 \
--infobox "Downloading ${TAG}" 0 0
# Download update file
STATUS=$(curl --insecure -s -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-a/releases/download/${TAG}/arc-a-${TAG}.img.zip" -o "${TMP_PATH}/arc-a-${TAG}.img.zip")
if [[ $? -ne 0 || ${STATUS} -ne 200 ]]; then
else
dialog --backtitle "$(backtitle)" --title "Upgrade Loader" --aspect 18 \
--infobox "Error downloading Updatefile!\nUse current Version." 0 0
sleep 5
arcModel
exit 0
fi
unzip -oq "${TMP_PATH}/arc-a-${TAG}.img.zip" -d "${TMP_PATH}"
rm -f "${TMP_PATH}/arc-a-${TAG}.img.zip"
if [ $? -ne 0 ]; then
--infobox "Downloading ${TAG}" 0 0
# Download update file
STATUS=$(curl --insecure -s -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-a/releases/download/${TAG}/arc-a-${TAG}.img.zip" -o "${TMP_PATH}/arc-a-${TAG}.img.zip")
if [[ $? -ne 0 || ${STATUS} -ne 200 ]]; then
dialog --backtitle "$(backtitle)" --title "Upgrade Loader" --aspect 18 \
--infobox "Error downloading Updatefile!\nUse current Version." 0 0
sleep 5
arcModel
exit 0
fi
unzip -oq "${TMP_PATH}/arc-a-${TAG}.img.zip" -d "${TMP_PATH}"
rm -f "${TMP_PATH}/arc-a-${TAG}.img.zip"
if [ $? -ne 0 ]; then
dialog --backtitle "$(backtitle)" --title "Upgrade Loader" --aspect 18 \
--infobox "Error extracting Updatefile!\nUse current Version." 0 0
sleep 5
arcModel
exit 0
fi
dialog --backtitle "$(backtitle)" --title "Upgrade Loader" --aspect 18 \
--infobox "Error extracting Updatefile!\nUse current Version." 0 0
sleep 5
arcModel
exit 0
--infobox "Installing new Loader Image" 0 0
# Process complete update
umount "${PART1_PATH}" "${PART2_PATH}" "${PART3_PATH}"
dd if="${TMP_PATH}/arc.img" of=$(blkid | grep 'LABEL="ARC3"' | cut -d3 -f1) bs=1M conv=fsync
exec reboot
fi
dialog --backtitle "$(backtitle)" --title "Upgrade Loader" --aspect 18 \
--infobox "Installing new Loader Image" 0 0
# Process complete update
umount "${PART1_PATH}" "${PART2_PATH}" "${PART3_PATH}"
dd if="${TMP_PATH}/arc.img" of=$(blkid | grep 'LABEL="ARC3"' | cut -d3 -f1) bs=1M conv=fsync
exec reboot
exit 0
}

Expand Down
4 changes: 2 additions & 2 deletions files/initrd/opt/arc/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
LKM="$(readConfigKey "lkm" "${USER_CONFIG_FILE}")"
MACSYS="$(readConfigKey "arc.macsys" "${USER_CONFIG_FILE}")"
CPU="$(echo $(cat /proc/cpuinfo 2>/dev/null | grep 'model name' | uniq | awk -F':' '{print $2}'))"
RAMTOAL=$(($(free -m | grep -i mem | awk '{print$2}') / 1024 + 1))
RAMTOTAL=$(($(free -m | grep -i mem | awk '{print$2}') / 1024 + 1))
RAM="${RAMTOTAL}GB"
VENDOR="$(dmesg 2>/dev/null | grep -i "DMI:" | sed 's/\[.*\] DMI: //i')"

Expand Down Expand Up @@ -235,7 +235,7 @@ elif [ "${DIRECTBOOT}" = "false" ]; then
echo -e "\033[1;37m"Booting DSM..."\033[0m"
for T in $(w | grep -v "TTY" | awk -F' ' '{print $2}')
do
echo -e "\n\033[1;37mThis interface will not be operational. Wait a few minutes.\033[0m\n Use \033[1;34mhttp://${IPCON}:5000\033[0m or try \033[1;34mhttp://find.synology.com/ \033[0mto find DSM and proceed.\n" >"/dev/${T}" 2>/dev/null || true
echo -e "\n\033[1;37mThis interface will not be operational. Wait a few minutes.\033[0m\nUse \033[1;34mhttp://${IPCON}:5000\033[0m or try \033[1;34mhttp://find.synology.com/ \033[0mto find DSM and proceed.\n" >"/dev/${T}" 2>/dev/null || true
done

# Clear logs for dbgutils addons
Expand Down

0 comments on commit bbc7e3e

Please sign in to comment.