Skip to content

Commit

Permalink
back wait ip timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
wjz304 committed Sep 12, 2023
1 parent ac5953d commit 9e50a71
Show file tree
Hide file tree
Showing 11 changed files with 1,173 additions and 1,111 deletions.
10 changes: 6 additions & 4 deletions files/board/arpl/overlayfs/opt/arpl/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ else
echo "$(printf "$(TEXT "Detected %s network cards.")" "${#ETHX[@]}")"
echo "$(TEXT "Checking Connect.")"
COUNT=0
while [ ${COUNT} -lt 32 ]; do
BOOTIPWAIT="$(readConfigKey "bootipwait" "${USER_CONFIG_FILE}")"
[ -z "${BOOTIPWAIT}" ] && BOOTIPWAIT=10
while [ ${COUNT} -lt $((${BOOTIPWAIT} + 32)) ]; do
hasConnect="false"
for N in $(seq 0 $(expr ${#ETHX[@]} - 1)); do
if ethtool ${ETHX[${N}]} | grep 'Link detected' | grep -q 'yes'; then
Expand Down Expand Up @@ -208,8 +210,8 @@ else
echo -en "\r${ETHX[${N}]}(${DRIVER}): $(TEXT "NOT CONNECTED")\n"
break
fi
if [ ${COUNT} -eq 8 ]; then # Under normal circumstances, no errors should occur here.
echo -en "\r${ETHX[${N}]}(${DRIVER}): $(TEXT "TIMEOUT")\n"
if [ ${COUNT} -eq ${BOOTIPWAIT} ]; then # Under normal circumstances, no errors should occur here.
echo -en "\r${ETHX[${N}]}(${DRIVER}): $(TEXT "TIMEOUT (Please check the IP on the router.)")\n"
break
fi
COUNT=$((${COUNT} + 1))
Expand Down Expand Up @@ -253,7 +255,7 @@ else
fi
echo -e "\033[1;37m$(TEXT "Booting...")\033[0m"
for T in $(w | grep -v "TTY" | awk -F' ' '{print $2}'); do
echo -e "\n\033[1;43m$(TEXT "[This interface will not be operational. Please use the http://find.synology.com/ find DSM and connect.]")\033[0m\n" >"/dev/${T}" 2>/dev/null || true
echo -e "\n\033[1;43m$(TEXT "[This interface will not be operational.\nPlease wait for a few minutes before using the http://find.synology.com/ or Synology Assistant find DSM and connect.]")\033[0m\n" >"/dev/${T}" 2>/dev/null || true
done
KERNELWAY="$(readConfigKey "kernelway" "${USER_CONFIG_FILE}")"
[ "${KERNELWAY}" = "kexec" ] && kexec -f -e || poweroff
Expand Down
4 changes: 3 additions & 1 deletion files/board/arpl/overlayfs/opt/arpl/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ if [ ! -f "${USER_CONFIG_FILE}" ]; then
writeConfigKey "notsetmacs" "false" "${USER_CONFIG_FILE}"
writeConfigKey "prerelease" "false" "${USER_CONFIG_FILE}"
writeConfigKey "bootwait" "10" "${USER_CONFIG_FILE}"
writeConfigKey "bootipwait" "10" "${USER_CONFIG_FILE}"
writeConfigKey "kernelway" "power" "${USER_CONFIG_FILE}"
writeConfigKey "odp" "false" "${USER_CONFIG_FILE}"
writeConfigKey "model" "" "${USER_CONFIG_FILE}"
writeConfigKey "productver" "" "${USER_CONFIG_FILE}"
writeConfigKey "buildnum" "" "${USER_CONFIG_FILE}"
Expand Down Expand Up @@ -211,7 +213,7 @@ for N in $(seq 0 $(expr ${#ETHX[@]} - 1)); do
break
fi
if [ ${COUNT} -eq 15 ]; then
echo -en "\r${ETHX[${N}]}(${DRIVER}): $(TEXT "TIMEOUT")\n"
echo -en "\r${ETHX[${N}]}(${DRIVER}): $(TEXT "TIMEOUT (Please check the IP on the router.)")\n"
break
fi
COUNT=$((${COUNT} + 1))
Expand Down
Loading

0 comments on commit 9e50a71

Please sign in to comment.