From e356f73e0973081452545daf121d69d01a69bc01 Mon Sep 17 00:00:00 2001 From: libm Date: Sat, 1 Mar 2025 21:10:47 +0800 Subject: [PATCH] fix: clashtun: sleep a while to load more logs --- script/clashctl.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/script/clashctl.sh b/script/clashctl.sh index 880e9b3..78045d5 100644 --- a/script/clashctl.sh +++ b/script/clashctl.sh @@ -112,9 +112,10 @@ _tunon() { _tunstatus 2>/dev/null && return 0 sudo "$BIN_YQ" -i '.tun.enable = true' "$CLASH_CONFIG_MIXIN" _merge_config_restart - clashstatus -l | grep -qs 'unsupported kernel version' && { + sleep 0.3s + clashstatus -l | grep -E 'unsupported kernel version|Start TUN listening error' && { _tunoff >&/dev/null - _error_quit '当前系统内核版本不支持' + _error_quit '不支持的内核版本' } _okcat "Tun 模式已开启" }