用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