functions: update

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium
2026-05-11 23:27:26 +02:00
parent 59c72a20c8
commit 370d4850dc
3 changed files with 10 additions and 10 deletions

View File

@@ -639,7 +639,7 @@ function juniorboot() {
function bootcheck() {
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
MODEL="$(readConfigKey "model" "${USER_CONFIG_FILE}")"
if [ "${ARC_MODE}" != "automated" ] && [ "${BUILDDONE}" = "false" ]; then
if [ "${ARC_MODE}" != "automated" ] && ([ "${BUILDDONE}" = "false" ] || [ ! -f "${MOD_ZIMAGE_FILE}" ] || [ ! -f "${MOD_RDGZ_FILE}" ]); then
dialog --backtitle "$(backtitle)" --title "Alert" \
--yesno "Config changed, you need to rebuild the Loader?" 0 0
if [ $? -eq 0 ]; then

View File

@@ -256,8 +256,8 @@ function findDSMRoot() {
# 1 - Netmask
function convert_netmask() {
bits=0
for octet in $(echo $1| sed 's/\./ /g'); do
binbits=$(echo "obase=2; ibase=10; ${octet}"| bc | sed 's/0//g')
for octet in $(echo $1| sed 's/\./ /g'); do
binbits=$(echo "obase=2; ibase=10; ${octet}"| bc | sed 's/0//g')
bits=$((${bits} + ${#binbits}))
done
echo "${bits}"
@@ -335,7 +335,7 @@ function checkBIOS_VT_d() {
# Rebooting
function rebootTo() {
BUILDDONE="$(readConfigKey "builddone" "${USER_CONFIG_FILE}")"
if [ "${CONFDONE}" = "true" ]; then
if [ "${CONFDONE}" = "true" ] && ([ "${1}" = "automated" ] || [ "${1}" = "junior" ] || [ "${1}" = "dsm" ]); then
if [ "${BUILDDONE}" != "true" ] || [ ! -f "${MOD_ZIMAGE_FILE}" ] || [ ! -f "${MOD_RDGZ_FILE}" ]; then
dialog --backtitle "$(backtitle)" --title "Reboot" \
--aspect 18 --yesno "Build is not complete!\nDSM will not boot.\nDo you want to continue?" 0 0
@@ -344,7 +344,7 @@ function rebootTo() {
fi
fi
fi
local MODES="config recovery junior automated update uefi memtest"
local MODES="config recovery junior automated update uefi memtest dsm"
[ -z "${1}" ] && exit 1
if ! echo "${MODES}" | grep -wq "${1}"; then exit 1; fi
[ "${1}" = "automated" ] && echo "arc-${MODEL}-${PRODUCTVER}-${ARC_VERSION}" >"${PART3_PATH}/automated"
@@ -625,7 +625,7 @@ function readData() {
function write_menu() {
echo "${1} \"${2}\" " >>"${TMP_PATH}/menu"
}
function write_menu_value() {
echo "${1} \"${2}: \Z4${3:-none}\Zn\" " >>"${TMP_PATH}/menu"
}
@@ -785,4 +785,4 @@ function customKernel() {
mergeConfigModules "$(getAllModules "${PLATFORM}" "${KPRE:+${KPRE}-}${KVER}" | awk '{print $1}')" "${USER_CONFIG_FILE}"
fi
done
}
}

View File

@@ -116,7 +116,7 @@ if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
echo "Try http://find.synology.com/ to connect the DSM via web."
}
fi
menuentry 'Arc DSM Mode' --id boot {
menuentry 'Arc DSM Mode' --id dsm {
gfxmode
echo "Loading Arc (${system_version}) Kernel..."
linux /bzImage-${system_version} ${ARC_CMDLINE} dsm_arc
@@ -183,7 +183,7 @@ fi
if [ -e ${prefix}/memtest ]; then
menuentry 'System Memtest86+' --id memtest {
echo "Loading memtest86+..."
linux ${prefix}/memtest
linux ${prefix}/memtest
}
fi
@@ -229,4 +229,4 @@ else
save_env linux_gfx_mode
configfile ${prefix}/grub.cfg
}
fi
fi