diff --git a/files/initrd/opt/arc/arc-functions.sh b/files/initrd/opt/arc/arc-functions.sh index a6f2b9cb..2b9a9aab 100755 --- a/files/initrd/opt/arc/arc-functions.sh +++ b/files/initrd/opt/arc/arc-functions.sh @@ -1558,7 +1558,7 @@ function loaderPassword() { ############################################################################### # Change Arc Loader Password function loaderPorts() { - MSG="Please use a Port between 0-65535: (Leave empty for default value.)" + MSG="Modify Ports (0-65535) (Leave empty for default):" HTTPPORT=$(grep -i '^HTTP_PORT=' /etc/arc.conf 2>/dev/null | cut -d'=' -f2) DUFSPORT=$(grep -i '^DUFS_PORT=' /etc/arc.conf 2>/dev/null | cut -d'=' -f2) TTYDPORT=$(grep -i '^TTYD_PORT=' /etc/arc.conf 2>/dev/null | cut -d'=' -f2) @@ -1591,7 +1591,7 @@ function loaderPorts() { [ $? -eq 0 ] && continue || break fi rm -f "/etc/arc.conf" - [ ! "${HTTPPORT:-7080}" = "7080" ] && echo "HTTP_PORT=${HTTPPORT}" >>"/etc/arc.conf" && /etc/init.d/S90thttpd restart >/dev/null 2>&1 + [ ! "${HTTPPORT:-8080}" = "8080" ] && echo "HTTP_PORT=${HTTPPORT}" >>"/etc/arc.conf" && /etc/init.d/S90thttpd restart >/dev/null 2>&1 [ ! "${DUFSPORT:-7304}" = "7304" ] && echo "DUFS_PORT=${DUFSPORT}" >>"/etc/arc.conf" && /etc/init.d/S99dufs restart >/dev/null 2>&1 [ ! "${TTYDPORT:-7681}" = "7681" ] && echo "TTYD_PORT=${TTYDPORT}" >>"/etc/arc.conf" && /etc/init.d/S99ttyd restart >/dev/null 2>&1 RDXZ_PATH="${TMP_PATH}/rdxz_tmp" diff --git a/files/initrd/opt/arc/arc.sh b/files/initrd/opt/arc/arc.sh index 0d9a29fb..c432d4b6 100755 --- a/files/initrd/opt/arc/arc.sh +++ b/files/initrd/opt/arc/arc.sh @@ -913,6 +913,7 @@ else echo "= \"\Z4========= Loader =========\Zn \" " >>"${TMP_PATH}/menu" echo "= \"\Z1=== Edit with caution! ===\Zn \" " >>"${TMP_PATH}/menu" echo "D \"StaticIP for Loader/DSM \" " >>"${TMP_PATH}/menu" + echo "c \"Offline Mode: \Z4${ARCOFFLINE}\Zn \" " >>"${TMP_PATH}/menu" echo "f \"Bootscreen Options \" " >>"${TMP_PATH}/menu" echo "W \"RD Compression: \Z4${RD_COMPRESSED}\Zn \" " >>"${TMP_PATH}/menu" echo "X \"Sata DOM: \Z4${SATADOM}\Zn \" " >>"${TMP_PATH}/menu" @@ -929,7 +930,6 @@ else echo "= \"\Z4========== Misc ==========\Zn \" " >>"${TMP_PATH}/menu" echo "x \"Backup/Restore/Recovery \" " >>"${TMP_PATH}/menu" [ "${ARCOFFLINE}" != "true" ] && echo "z \"Update Menu \" " >>"${TMP_PATH}/menu" - echo "c \"Offline Mode: \Z4${ARCOFFLINE}\Zn \" " >>"${TMP_PATH}/menu" echo "I \"Power/Service Menu \" " >>"${TMP_PATH}/menu" echo "V \"Credits \" " >>"${TMP_PATH}/menu" @@ -1062,6 +1062,11 @@ else NEXT="8" ;; D) staticIPMenu; NEXT="D" ;; + c) [ "${ARCOFFLINE}" == "true" ] && ARCOFFLINE='false' || ARCOFFLINE='true' + writeConfigKey "arc.offline" "${ARCOFFLINE}" "${USER_CONFIG_FILE}" + [ "${ARCOFFLINE}" == "false" ] && exec arc.sh + NEXT="c" + ;; f) bootScreen; NEXT="f" ;; W) [ "${RD_COMPRESSED}" == "true" ] && RD_COMPRESSED='false' || RD_COMPRESSED='true' writeConfigKey "rd-compressed" "${RD_COMPRESSED}" "${USER_CONFIG_FILE}" @@ -1086,11 +1091,6 @@ else # Misc Settings x) backupMenu; NEXT="x" ;; z) updateMenu; NEXT="z" ;; - c) [ "${ARCOFFLINE}" == "true" ] && ARCOFFLINE='false' || ARCOFFLINE='true' - writeConfigKey "arc.offline" "${ARCOFFLINE}" "${USER_CONFIG_FILE}" - [ "${ARCOFFLINE}" == "false" ] && exec arc.sh - NEXT="c" - ;; I) rebootMenu; NEXT="I" ;; V) credits; NEXT="V" ;; esac @@ -1108,4 +1108,4 @@ echo -e "Password: \033[1;34marc\033[0m" echo echo -e "Web Terminal: \033[1;34mhttp://${IPCON}:${TTYDPORT}\033[0m" echo -e "Web Filemanager: \033[1;34mhttp://${IPCON}:${DUFSPORT}\033[0m" -echo -e "Web Utilities: \033[1;34mhttp://${IPCON}:${HTTPPORT}\033[0m" +echo diff --git a/files/initrd/opt/arc/include/consts.sh b/files/initrd/opt/arc/include/consts.sh index 8bb69e5f..5cc35abd 100755 --- a/files/initrd/opt/arc/include/consts.sh +++ b/files/initrd/opt/arc/include/consts.sh @@ -45,8 +45,8 @@ EXTRACTOR_PATH="${PART3_PATH}/extractor" EXTRACTOR_BIN="syno_extract_system_patch" HTTPPORT=$(grep -i '^HTTP_PORT=' /etc/arc.conf 2>/dev/null | cut -d'=' -f2) -[ -z "${HTTPPORT}" ] && HTTPPORT=7080 +[ -z "${HTTPPORT}" ] && HTTPPORT=7080 || true DUFSPORT=$(grep -i '^DUFS_PORT=' /etc/arc.conf 2>/dev/null | cut -d'=' -f2) -[ -z "${DUFSPORT}" ] && DUFSPORT=7304 +[ -z "${DUFSPORT}" ] && DUFSPORT=7304 || true TTYDPORT=$(grep -i '^TTYD_PORT=' /etc/arc.conf 2>/dev/null | cut -d'=' -f2) -[ -z "${TTYDPORT}" ] && TTYDPORT=7681 \ No newline at end of file +[ -z "${TTYDPORT}" ] && TTYDPORT=7681 || true \ No newline at end of file diff --git a/files/initrd/opt/arc/init.sh b/files/initrd/opt/arc/init.sh index f52283cc..2fc8cff5 100755 --- a/files/initrd/opt/arc/init.sh +++ b/files/initrd/opt/arc/init.sh @@ -4,7 +4,6 @@ set -e [[ -z "${ARC_PATH}" || ! -d "${ARC_PATH}/include" ]] && ARC_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)" . ${ARC_PATH}/include/functions.sh -. ${ARC_PATH}/include/update.sh # Get Loader Disk Bus [ -z "${LOADER_DISK}" ] && die "Loader Disk not found!"