mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
add LINK LOCAL
This commit is contained in:
parent
ba1111c7cd
commit
a3a736e64b
@ -223,7 +223,11 @@ else
|
||||
COUNT=$((${COUNT} + 1))
|
||||
IP="$(getIP ${N})"
|
||||
if [ -n "${IP}" ]; then
|
||||
echo -en "\r${N}(${DRIVER}): $(printf "$(TEXT "Access \033[1;34mhttp://%s:5000\033[0m to connect the DSM via web.")" "${IP}")\n"
|
||||
if [[ "${IP}" =~ ^169\.254\..* ]]; then
|
||||
echo -en "\r${N}(${DRIVER}): $(TEXT "LINK LOCAL (No DHCP server detected.)")\n"
|
||||
else
|
||||
echo -en "\r${N}(${DRIVER}): $(printf "$(TEXT "Access \033[1;34mhttp://%s:5000\033[0m to connect the DSM via web.")" "${IP}")\n"
|
||||
fi
|
||||
break
|
||||
fi
|
||||
echo -n "."
|
||||
@ -254,6 +258,7 @@ else
|
||||
DSMLOGO="$(readConfigKey "dsmlogo" "${USER_CONFIG_FILE}")"
|
||||
if [ "${DSMLOGO}" = "true" -a -c "/dev/fb0" ]; then
|
||||
IP="$(getIP)"
|
||||
[[ "${IP}" =~ ^169\.254\..* ]] && IP=""
|
||||
[ -n "${IP}" ] && URL="http://${IP}:5000" || URL="http://find.synology.com/"
|
||||
python ${WORK_PATH}/include/functions.py makeqr -d "${URL}" -l "6" -o "${TMP_PATH}/qrcode_boot.png"
|
||||
[ -f "${TMP_PATH}/qrcode_boot.png" ] && echo | fbv -acufi "${TMP_PATH}/qrcode_boot.png" >/dev/null 2>/dev/null || true
|
||||
|
@ -168,7 +168,11 @@ for N in ${ETHX}; do
|
||||
COUNT=$((${COUNT} + 1))
|
||||
IP="$(getIP ${N})"
|
||||
if [ -n "${IP}" ]; then
|
||||
echo -en "\r${N}(${DRIVER}): $(printf "$(TEXT "Access \033[1;34mhttp://%s:7681\033[0m to configure the loader via web terminal.")" "${IP}")\n"
|
||||
if [[ "${IP}" =~ ^169\.254\..* ]]; then
|
||||
echo -en "\r${N}(${DRIVER}): $(TEXT "LINK LOCAL (No DHCP server detected.)")\n"
|
||||
else
|
||||
echo -en "\r${N}(${DRIVER}): $(printf "$(TEXT "Access \033[1;34mhttp://%s:7681\033[0m to configure the loader via web terminal.")" "${IP}")\n"
|
||||
fi
|
||||
break
|
||||
fi
|
||||
echo -n "."
|
||||
@ -192,6 +196,7 @@ echo
|
||||
DSMLOGO="$(readConfigKey "dsmlogo" "${USER_CONFIG_FILE}")"
|
||||
if [ "${DSMLOGO}" = "true" -a -c "/dev/fb0" -a ! "LOCALBUILD" = "${LOADER_DISK}" ]; then
|
||||
IP="$(getIP)"
|
||||
[[ "${IP}" =~ ^169\.254\..* ]] && IP=""
|
||||
[ -n "${IP}" ] && URL="http://${IP}:7681" || URL="http://rr:7681/"
|
||||
python ${WORK_PATH}/include/functions.py makeqr -d "${URL}" -l "0" -o "${TMP_PATH}/qrcode_init.png"
|
||||
[ -f "${TMP_PATH}/qrcode_init.png" ] && echo | fbv -acufi "${TMP_PATH}/qrcode_init.png" >/dev/null 2>/dev/null || true
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
# English translations for RR package.
|
||||
# Copyright (C) 2023 THE RR'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the RR package.
|
||||
# Ing <wjz304>, 2023.
|
||||
# Ing <wjz304@qq.com>, 2023.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -19,6 +19,7 @@ fi
|
||||
|
||||
# Get actual IP
|
||||
IP="$(getIP)"
|
||||
[[ "${IP}" =~ ^169\.254\..* ]] && IP=""
|
||||
|
||||
# Debug flag
|
||||
# DEBUG=""
|
||||
@ -1533,6 +1534,7 @@ function setStaticIP() {
|
||||
done
|
||||
sleep 1
|
||||
IP="$(getIP)"
|
||||
[[ "${IP}" =~ ^169\.254\..* ]] && IP=""
|
||||
) 2>&1 | DIALOG --title "$(TEXT "Advanced")" \
|
||||
--progressbox "$(TEXT "Setting IP ...")" 20 100
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user