1. 通过ifconfig对比插入USB网卡前后的信息,判断出新增网卡为:eth1
  2. 编辑脚本:
vim /etc/init.d/autoLoadNet
#!/bin/sh
START=80
start() {
    ifconfig eth1 up
}
stop() {
    ifconfig eth1 down 
}
  1. 给脚本设置执行权限:
chmod +x /etc/init.d/autoLoadNet
  1. 设置自动启动
/etc/init.d/autoLoadNet enable

完成!

最后修改:2023 年 08 月 26 日
如果觉得我的文章对你有用,请随意赞赏