Skip to content
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

更新IP地址的获取方式 #18

Merged
merged 1 commit into from
Mar 24, 2020
Merged

更新IP地址的获取方式 #18

merged 1 commit into from
Mar 24, 2020

Commits on Mar 23, 2020

  1. 更新IP地址的获取方式

    在不同操作系统下全路径不一样,比如上述的 ifconfig / route 在 Debian 系统的 /sbin 目录下。
    另外 Debian 打印出来 多 'addr:' 需要多处理 /sbin/ifconfig `/sbin/route|grep '^default'|awk '{print $NF}'`|grep inet|awk '{print $2}'|awk -F':' '{print $2}'|head -n 1
    还不如直接 hostname -i 获取,正常配置下都Okay的。
    higkoo committed Mar 23, 2020
    Configuration menu
    Copy the full SHA
    16871e7 View commit details
    Browse the repository at this point in the history