mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
fix w
This commit is contained in:
parent
cdaf827489
commit
8feb56926e
@ -247,12 +247,12 @@ else
|
|||||||
done
|
done
|
||||||
BOOTWAIT="$(readConfigKey "bootwait" "${USER_CONFIG_FILE}")"
|
BOOTWAIT="$(readConfigKey "bootwait" "${USER_CONFIG_FILE}")"
|
||||||
[ -z "${BOOTWAIT}" ] && BOOTWAIT=10
|
[ -z "${BOOTWAIT}" ] && BOOTWAIT=10
|
||||||
w -h 2>/dev/null | grep -v tty1 | awk '{print $1" "$2" "$3}' >WB
|
busybox w 2>/dev/null | awk '{print $1" "$2" "$4" "$5" "$6}' >WB
|
||||||
MSG=""
|
MSG=""
|
||||||
while test ${BOOTWAIT} -ge 0; do
|
while test ${BOOTWAIT} -ge 0; do
|
||||||
MSG="$(printf "\033[1;33m$(TEXT "%2ds (Changing access(ssh/web) status will interrupt boot)")\033[0m" "${BOOTWAIT}")"
|
MSG="$(printf "\033[1;33m$(TEXT "%2ds (Changing access(ssh/web) status will interrupt boot)")\033[0m" "${BOOTWAIT}")"
|
||||||
echo -en "\r${MSG}"
|
echo -en "\r${MSG}"
|
||||||
w -h 2>/dev/null | grep -v tty1 | awk '{print $1" "$2" "$3}' >WC
|
busybox w 2>/dev/null | awk '{print $1" "$2" "$4" "$5" "$6}' >WC
|
||||||
if ! diff WB WC >/dev/null 2>&1; then
|
if ! diff WB WC >/dev/null 2>&1; then
|
||||||
echo -en "\r\033[1;33m$(TEXT "access(ssh/web) status has changed and booting is interrupted.")\033[0m\n"
|
echo -en "\r\033[1;33m$(TEXT "access(ssh/web) status has changed and booting is interrupted.")\033[0m\n"
|
||||||
rm -f WB WC
|
rm -f WB WC
|
||||||
@ -286,7 +286,7 @@ else
|
|||||||
fi
|
fi
|
||||||
kexec ${KEXECARGS} -l "${MOD_ZIMAGE_FILE}" --initrd "${MOD_RDGZ_FILE}" --command-line="${CMDLINE_LINE}" >"${LOG_FILE}" 2>&1 || dieLog
|
kexec ${KEXECARGS} -l "${MOD_ZIMAGE_FILE}" --initrd "${MOD_RDGZ_FILE}" --command-line="${CMDLINE_LINE}" >"${LOG_FILE}" 2>&1 || dieLog
|
||||||
echo -e "\033[1;37m$(TEXT "Booting ...")\033[0m"
|
echo -e "\033[1;37m$(TEXT "Booting ...")\033[0m"
|
||||||
for T in $(w -h 2>/dev/null | awk '{print $2}'); do
|
for T in $(busybox w 2>/dev/null | grep -v 'TTY' | awk '{print $2}'); do
|
||||||
[ -w "/dev/${T}" ] && echo -e "\n\033[1;43m$(TEXT "[This interface will not be operational. Please wait a few minutes.\nFind DSM via http://find.synology.com/ or Synology Assistant and connect.]")\033[0m\n" >"/dev/${T}" 2>/dev/null || true
|
[ -w "/dev/${T}" ] && echo -e "\n\033[1;43m$(TEXT "[This interface will not be operational. Please wait a few minutes.\nFind DSM via http://find.synology.com/ or Synology Assistant and connect.]")\033[0m\n" >"/dev/${T}" 2>/dev/null || true
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user