Merge pull request #5997 from AuxXxilium/dev

Dev
This commit is contained in:
AuxXxilium
2025-01-27 17:51:21 +01:00
committed by GitHub
5 changed files with 28 additions and 20 deletions

View File

@@ -1855,7 +1855,7 @@ function loaderPorts() {
MSG="Modify Ports (0-65535) (Leave empty for default):"
unset HTTPPORT DUFSPORT TTYDPORT
[ -f "/etc/arc.conf" ] && source "/etc/arc.conf" 2>/dev/null
local HTTP=${HTTPPORT:-8080}
local HTTP=${HTTPPORT:-80}
local DUFS=${DUFSPORT:-7304}
local TTYD=${TTYDPORT:-7681}
while true; do
@@ -1864,7 +1864,7 @@ function loaderPorts() {
2>"${TMP_PATH}/resp"
RET=$?
case ${RET} in
0) # ok-button
0)
HTTP=$(sed -n '1p' "${TMP_PATH}/resp" 2>/dev/null)
DUFS=$(sed -n '2p' "${TMP_PATH}/resp" 2>/dev/null)
TTYD=$(sed -n '3p' "${TMP_PATH}/resp" 2>/dev/null)
@@ -1876,7 +1876,7 @@ function loaderPorts() {
[ $? -eq 0 ] && continue || break
fi
rm -f "/etc/arc.conf"
[ "${HTTPPORT:-5000}" != "5000" ] && echo "HTTP_PORT=${HTTPPORT}" >>"/etc/arc.conf"
[ "${HTTPPORT:-80}" != "80" ] && echo "HTTP_PORT=${HTTPPORT}" >>"/etc/arc.conf"
[ "${DUFSPORT:-7304}" != "7304" ] && echo "DUFS_PORT=${DUFSPORT}" >>"/etc/arc.conf"
[ "${TTYDPORT:-7681}" != "7681" ] && echo "TTYD_PORT=${TTYDPORT}" >>"/etc/arc.conf"
RDXZ_PATH="${TMP_PATH}/rdxz_tmp"
@@ -1931,7 +1931,7 @@ function loaderPorts() {
--msgbox "${MSG}" 0 0
rm -f "${TMP_PATH}/restartS.sh"
{
[ ! "${HTTP:-8080}" = "${HTTPPORT:-8080}" ] && echo "/etc/init.d/S90thttpd restart"
[ ! "${HTTP:-80}" = "${HTTPPORT:-80}" ] && echo "/etc/init.d/S90thttpd restart"
[ ! "${DUFS:-7304}" = "${DUFSPORT:-7304}" ] && echo "/etc/init.d/S99dufs restart"
[ ! "${TTYD:-7681}" = "${TTYDPORT:-7681}" ] && echo "/etc/init.d/S99ttyd restart"
} >"${TMP_PATH}/restartS.sh"
@@ -1961,19 +1961,25 @@ function disablescheduledTasks {
for I in ${DSMROOTS}; do
# fixDSMRootPart "${I}"
mount -t ext4 "${I}" "${TMP_PATH}/mdX"
[ $? -ne 0 ] && continue
if [ $? -ne 0 ]; then
continue
fi
if [ -f "${TMP_PATH}/mdX/usr/syno/etc/esynoscheduler/esynoscheduler.db" ]; then
echo "UPDATE task SET enable = 0;" | sqlite3 ${TMP_PATH}/mdX/usr/syno/etc/esynoscheduler/esynoscheduler.db
echo "UPDATE task SET enable = 0;" | sqlite3 "${TMP_PATH}/mdX/usr/syno/etc/esynoscheduler/esynoscheduler.db"
sync
echo "true" >${TMP_PATH}/isEnable
echo "true" > "${TMP_PATH}/isEnable"
fi
umount "${TMP_PATH}/mdX"
done
rm -rf "${TMP_PATH}/mdX"
) 2>&1 | dialog --backtitle "$(backtitle)" --title "Scheduled Tasks" \
--progressbox "Modifying..." 20 100
[ "$(cat ${TMP_PATH}/isEnable 2>/dev/null)" = "true" ] && MSG="Disable all scheduled tasks successful." || MSG="Disable all scheduled tasks failed."
dialog --backtitle "$(backtitle)" --title Scheduled Tasks \
if [ "$(cat ${TMP_PATH}/isEnable 2>/dev/null)" = "true" ]; then
MSG="Disable all scheduled tasks successful."
else
MSG="Disable all scheduled tasks failed."
fi
dialog --backtitle "$(backtitle)" --title "Scheduled Tasks" \
--msgbox "${MSG}" 0 0
return
}

View File

@@ -751,9 +751,9 @@ elif [ "${ARCMODE}" = "automated" ]; then
make
fi
elif [ "${ARCMODE}" = "config" ]; then
[ "${CONFDONE}" = "true" ] && NEXT="2" || NEXT="1"
[ "${BUILDDONE}" = "true" ] && NEXT="3" || NEXT="1"
while true; do
[ "${CONFDONE}" = "true" ] && NEXT="2" || NEXT="1"
[ "${BUILDDONE}" = "true" ] && NEXT="3" || NEXT="1"
rm -f "${TMP_PATH}/menu" "${TMP_PATH}/resp" >/dev/null 2>&1 || true
write_menu "=" "\Z4===== Main =====\Zn"
@@ -779,7 +779,6 @@ elif [ "${ARCMODE}" = "config" ]; then
write_menu "=" "\Z4===== Info =====\Zn"
write_menu "a" "Sysinfo"
write_menu "A" "Networkdiag"
write_menu "=" "\Z4===== System ====\Zn"
if [ "${CONFDONE}" = "true" ]; then
if [ "${ARCOPTS}" = "true" ]; then
@@ -806,9 +805,9 @@ elif [ "${ARCMODE}" = "config" ]; then
for addon in "cpufreqscaling" "storagepanel" "sequentialio"; do
if readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "${addon}"; then
case "${addon}" in
"cpufreqscaling") write_menu "g" "Frequency Scaling Governor" ;;
"storagepanel") write_menu "P" "StoragePanel Options" ;;
"sequentialio") write_menu "Q" "SequentialIO Options" ;;
"cpufreqscaling") write_menu "g" "Scaling Governor" ;;
"storagepanel") write_menu "P" "StoragePanel" ;;
"sequentialio") write_menu "Q" "SequentialIO" ;;
esac
fi
done
@@ -893,7 +892,7 @@ elif [ "${ARCMODE}" = "config" ]; then
write_menu "I" "Power/Service Menu"
write_menu "V" "Credits"
if [ "$TERM" != "xterm-256color" ]; then
WEBCONFIG="Webconfig: http://${IPCON}:5000"
WEBCONFIG="Webconfig: http://${IPCON}${HTTPPORT:+:$HTTPPORT}"
else
WEBCONFIG=""
fi
@@ -1072,7 +1071,7 @@ fi
# Inform user
echo -e "Call \033[1;34marc.sh\033[0m to configure Loader"
echo
echo -e "Web Config: \033[1;34mhttp://${IPCON}:${HTTPPORT:-5000}\033[0m"
echo -e "Web Config: \033[1;34mhttp://${IPCON}${HTTPPORT:+:$HTTPPORT}\033[0m"
echo
echo -e "SSH Access:"
echo -e "IP: \033[1;34m${IPCON}\033[0m"

View File

@@ -345,6 +345,9 @@ elif [ "${DIRECTBOOT}" = "false" ]; then
[ -f "${TMP_PATH}/qrcode_boot.png" ] && echo | fbv -acufi "${TMP_PATH}/qrcode_boot.png" >/dev/null 2>/dev/null || true
fi
# Wait for boot interrupt
_bootwait
for T in $(busybox w 2>/dev/null | grep -v 'TTY' | awk '{print $2}'); do
if [ -w "/dev/${T}" ]; then
[ -n "${IPCON}" ] && echo -e "Use \033[1;34mhttp://${IPCON}:5000\033[0m or try \033[1;34mhttp://find.synology.com/ \033[0mto find DSM and proceed.\n\n\033[1;37mThis interface will not be operational. Wait a few minutes - Network will be unreachable until DSM boot.\033[0m\n" >"/dev/${T}" 2>/dev/null \

View File

@@ -828,7 +828,7 @@ elif [ "${ARCMODE}" = "config" ]; then
EXTRA_LABEL="Boot"
fi
if [ "$TERM" != "xterm-256color" ]; then
WEBCONFIG="Webconfig: http://${IPCON}:5000"
WEBCONFIG="Webconfig: http://${IPCON}${HTTPPORT:+:$HTTPPORT}"
else
WEBCONFIG=""
fi
@@ -931,7 +931,7 @@ fi
# Inform user
echo -e "Call \033[1;34marc.sh\033[0m to configure Loader"
echo
echo -e "Web Config: \033[1;34mhttp://${IPCON}:${HTTPPORT:-5000}\033[0m"
echo -e "Web Config: \033[1;34mhttp://${IPCON}${HTTPPORT:+:$HTTPPORT}\033[0m"
echo
echo -e "SSH Access:"
echo -e "IP: \033[1;34m${IPCON}\033[0m"

View File

@@ -221,7 +221,7 @@ touch "${HOME}/.initialized"
# Load Arc Overlay
echo -e "\033[1;34mLoading Arc Overlay...\033[0m"
echo
echo -e "Use \033[1;34mDisplay Output\033[0m or \033[1;34mhttp://${IPCON}:${HTTPPORT:-5000}\033[0m to configure Loader."
echo -e "Use \033[1;34mDisplay Output\033[0m or \033[1;34mhttp://${IPCON}${HTTPPORT:+:$HTTPPORT}\033[0m to configure Loader."
# Check memory and load Arc
RAM=$(awk '/MemTotal:/ {printf "%.0f", $2 / 1024}' /proc/meminfo 2>/dev/null)