mirror of
https://github.com/bol-van/zapret.git
synced 2026-10-30 14:34:05 +09:00
blockcheck: support cygwin native ping
This commit is contained in:
1 parent
4e8766f245
commit
23f2de8014
2 files changed
+19
-3
No files matched your search
+12
-1
@@ -49,6 +49,17 @@ contains()
|
||||
# check if substring $2 contains in $1
|
||||
[ "${1#*$2}" != "$1" ]
|
||||
}
|
||||
starts_with()
|
||||
{
|
||||
# $1 : what
|
||||
# $2 : starts with
|
||||
case "$1" in
|
||||
"$2"*)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
return 1
|
||||
}
|
||||
find_str_in_list()
|
||||
{
|
||||
[ -n "$1" ] && {
|
||||
@@ -290,7 +301,7 @@ shell_name()
|
||||
SHELL_NAME=$(ps -p $$ -o comm=)
|
||||
fi
|
||||
|
||||
[ -n "$SHELL_NAME" ] || SHELL_NAME=$(basename "$SHELL")
|
||||
[ -n "$SHELL_NAME" ] || SHELL_NAME="$(basename "$SHELL")"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user