当Linux系统出现重启网卡出现ifup和ifdown文件或目录不存在问题,Shutting down interface eth0: /etc/init.d/functions:line 517:

用service network restart重启网卡报错:

Shutting down interface eth0: /etc/init.d/functions:line 517:./ifdown:No such file or directory                        [FAILED]

Shutting down loopback interface: /etc/init.d/functions:line 517:./ifdown:No such file or directory                        [FAILED]

Shutting up loopback interface: /etc/init.d/functions:line 517:./ifup:No such file or directory                        [FAILED]

Shutting up interface eth0: /etc/init.d/functions:line 517:./ifup:No such file or directory                        [FAILED]


RTNETLINK answers:File exists

RTNETLINK answers:File exists

RTNETLINK answers:File exists

RTNETLINK answers:File exists


解决方法:

首先看一下/etc/sysconfig/network-script/目录下是否有这个软连接,我的ifdown和ifup变成了红色的,目录下有这个软链接。

[root@ora10g network-scripts]# ls -lrt ifdown ifup
lrwxrwxrwx 1 root root 12 Dec  9 06:17 ifdown ->../.. /sbin/ifdown
lrwxrwxrwx 1 root root 10 Dec  9 06:17 ifup ->../.. /sbin/ifup

重新创建一下软链接,问题就解决了,命令如下:

[root@ora10g network-scripts]# rm -rf ifdown

[root@ora10g network-scripts]# rm -rf ifdown


[root@ora10g network-scripts]# ln -s /sbin/ifup /etc/sysconfig/network-scripts/ifup

[root@ora10g network-scripts]# ln -s /sbin/ifup /etc/sysconfig/network-scripts/ifup























评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值