-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
可以省去问用户TUN情况的,改为自动判断 #13
Comments
有没有可能有其他的输出? |
有的,什么operating还有另一个的我遇到过,那都是没开tun的,开了暂时只遇到...in bad....,所以用这个做判断,对了还有1个为什么是中文的呢?我遇到过一些系统,他显示中文。 |
LGTM,你可以提交一个PR吗? 另外,cat tr 的输出可以重定向到 /dev/null 以避免误会。 |
tr 大写→小写,只为避免可能存在奇怪系统有大小写导致判断错了(暂未遇到,中文的就遇到过)。 不用PR啦,你看合用的话,你下次更新放进去好了 |
看多次用到 cat /etc/issue 把内容输出到变量,再用 =~ 和 ! =~ 来判断应能精简不少 |
化简了几处:
|
另外我在想卸载是不是一定要重启的,我用以下命令能杀掉进程和启动服务的,不知道是否可行
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cat /dev/net/tun 这里的内容输入到变量,再作判断,如
The text was updated successfully, but these errors were encountered: