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))
|
COUNT=$((${COUNT} + 1))
|
||||||
IP="$(getIP ${N})"
|
IP="$(getIP ${N})"
|
||||||
if [ -n "${IP}" ]; then
|
if [ -n "${IP}" ]; then
|
||||||
|
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"
|
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
|
break
|
||||||
fi
|
fi
|
||||||
echo -n "."
|
echo -n "."
|
||||||
@ -254,6 +258,7 @@ else
|
|||||||
DSMLOGO="$(readConfigKey "dsmlogo" "${USER_CONFIG_FILE}")"
|
DSMLOGO="$(readConfigKey "dsmlogo" "${USER_CONFIG_FILE}")"
|
||||||
if [ "${DSMLOGO}" = "true" -a -c "/dev/fb0" ]; then
|
if [ "${DSMLOGO}" = "true" -a -c "/dev/fb0" ]; then
|
||||||
IP="$(getIP)"
|
IP="$(getIP)"
|
||||||
|
[[ "${IP}" =~ ^169\.254\..* ]] && IP=""
|
||||||
[ -n "${IP}" ] && URL="http://${IP}:5000" || URL="http://find.synology.com/"
|
[ -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"
|
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
|
[ -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))
|
COUNT=$((${COUNT} + 1))
|
||||||
IP="$(getIP ${N})"
|
IP="$(getIP ${N})"
|
||||||
if [ -n "${IP}" ]; then
|
if [ -n "${IP}" ]; then
|
||||||
|
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"
|
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
|
break
|
||||||
fi
|
fi
|
||||||
echo -n "."
|
echo -n "."
|
||||||
@ -192,6 +196,7 @@ echo
|
|||||||
DSMLOGO="$(readConfigKey "dsmlogo" "${USER_CONFIG_FILE}")"
|
DSMLOGO="$(readConfigKey "dsmlogo" "${USER_CONFIG_FILE}")"
|
||||||
if [ "${DSMLOGO}" = "true" -a -c "/dev/fb0" -a ! "LOCALBUILD" = "${LOADER_DISK}" ]; then
|
if [ "${DSMLOGO}" = "true" -a -c "/dev/fb0" -a ! "LOCALBUILD" = "${LOADER_DISK}" ]; then
|
||||||
IP="$(getIP)"
|
IP="$(getIP)"
|
||||||
|
[[ "${IP}" =~ ^169\.254\..* ]] && IP=""
|
||||||
[ -n "${IP}" ] && URL="http://${IP}:7681" || URL="http://rr:7681/"
|
[ -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"
|
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
|
[ -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.
|
# English translations for RR package.
|
||||||
# Copyright (C) 2023 THE RR'S COPYRIGHT HOLDER
|
# Copyright (C) 2023 THE RR'S COPYRIGHT HOLDER
|
||||||
# This file is distributed under the same license as the RR package.
|
# This file is distributed under the same license as the RR package.
|
||||||
# Ing <wjz304>, 2023.
|
# Ing <wjz304@qq.com>, 2023.
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
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
|
# Get actual IP
|
||||||
IP="$(getIP)"
|
IP="$(getIP)"
|
||||||
|
[[ "${IP}" =~ ^169\.254\..* ]] && IP=""
|
||||||
|
|
||||||
# Debug flag
|
# Debug flag
|
||||||
# DEBUG=""
|
# DEBUG=""
|
||||||
@ -1533,6 +1534,7 @@ function setStaticIP() {
|
|||||||
done
|
done
|
||||||
sleep 1
|
sleep 1
|
||||||
IP="$(getIP)"
|
IP="$(getIP)"
|
||||||
|
[[ "${IP}" =~ ^169\.254\..* ]] && IP=""
|
||||||
) 2>&1 | DIALOG --title "$(TEXT "Advanced")" \
|
) 2>&1 | DIALOG --title "$(TEXT "Advanced")" \
|
||||||
--progressbox "$(TEXT "Setting IP ...")" 20 100
|
--progressbox "$(TEXT "Setting IP ...")" 20 100
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user