mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-13 18:28:34 +05:00
install_easy: openwrt offer coreutils-sleep
This commit is contained in:
parent
2de52fdbf2
commit
c9f34a064e
@ -27,6 +27,24 @@ GET_LIST="$IPSET_DIR/get_config.sh"
|
|||||||
MD5=md5sum
|
MD5=md5sum
|
||||||
exists $MD5 || MD5=md5
|
exists $MD5 || MD5=md5
|
||||||
|
|
||||||
|
fsleep_setup()
|
||||||
|
{
|
||||||
|
[ -n "$FSLEEP" ] || {
|
||||||
|
if sleep 0.1 2>/dev/null; then
|
||||||
|
FSLEEP=1
|
||||||
|
elif busybox usleep 1 2>/dev/null; then
|
||||||
|
FSLEEP=2
|
||||||
|
else
|
||||||
|
local errtext=$(read -t 0.001 2>&1)
|
||||||
|
if [ -z "$errtext" ]; then
|
||||||
|
FSLEEP=3
|
||||||
|
else
|
||||||
|
FSLEEP=0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sedi()
|
sedi()
|
||||||
{
|
{
|
||||||
# MacOS doesnt support -i without parameter. busybox doesnt support -i with parameter.
|
# MacOS doesnt support -i without parameter. busybox doesnt support -i with parameter.
|
||||||
@ -831,6 +849,19 @@ check_prerequisites_openwrt()
|
|||||||
opkg install --force-overwrite coreutils-sort
|
opkg install --force-overwrite coreutils-sort
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
[ "$FSLEEP" = 0 ] && is_linked_to_busybox sleep && {
|
||||||
|
echo
|
||||||
|
echo no methods of sub-second sleep were found.
|
||||||
|
echo if you want to speed up blockcheck install coreutils-sleep
|
||||||
|
if ask_yes_no N "do you want to install COREUTILS sleep"; then
|
||||||
|
[ "$UPD" = "0" ] && {
|
||||||
|
opkg update
|
||||||
|
UPD=1
|
||||||
|
}
|
||||||
|
opkg install --force-overwrite coreutils-sleep
|
||||||
|
fsleep_setup
|
||||||
|
fi
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
deoffload_openwrt_firewall()
|
deoffload_openwrt_firewall()
|
||||||
@ -977,6 +1008,7 @@ install_macos()
|
|||||||
# build binaries, do not use precompiled
|
# build binaries, do not use precompiled
|
||||||
[ "$1" = "make" ] && FORCE_BUILD=1
|
[ "$1" = "make" ] && FORCE_BUILD=1
|
||||||
|
|
||||||
|
fsleep_setup
|
||||||
fix_sbin_path
|
fix_sbin_path
|
||||||
check_system
|
check_system
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user