错误信息:

红帽RHEL5.5系统,重启网卡报错

[root@localhost network-scripts]# service network restart
Shutting down interface eth0: ./network-functions: line 78: .: ifcfg-eth0: file not found
                                                           [ OK ]
Shutting down loopback interface: ./network-functions: line 78: .: ifcfg-lo: file not found
                                                           [ OK ]
Bringing up loopback interface: ./network-functions: line 78: .: ifcfg-lo: file not found
Missing config file ifcfg-ifcfg-lo.
                                                           [ OK ]
Bringing up interface eth0: ./network-functions: line 78: .: ifcfg-eth0: file not found
Missing config file ifcfg-ifcfg-eth0.
                                                           [ OK ]

问题原因:

/etc/sysconfig/network-scripts/network-functions fails under bash 4.1.
The reason is that bash 4 fixed a bug in the source function (http://tiswww.case.edu/php/chet/bash/COMPAT) that cause the function to include the current directory in the path when sourcing files.

解决方法:

在78行中,修改  . $CONFIG 为   . ./$CONFIG

Line 78 in network-functions is ". $CONFIG" which means it wouldn't work if bash hadn't that bug.
It should be changed to ". ./$CONFIG" which solves the problem.

RHEL5.X 重启网卡出现./network-functions: line 78: .: ifcfg-eth0: file not found的更多相关文章

  1. 在VMware的虚拟机中克隆CentOS,在重启网卡的时候报错解决办法

    克隆虚拟机配置 1.修改:vi /etc/hosts 2.修改:vi /etc/sysconfig/network 3.重启生效:reboot或者init 6 如不重启可以输入:hostname  新 ...

  2. Linux 重启网卡失败 Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.

    linux下重启网卡使用命令 : service network restart 时报错: [root@slave01 hadoop]# service network restart Startin ...

  3. centos7重启网卡报Job for network.service failed because...错误

    解决: [root@mina0 hadoop]# systemctl stop NetworkManager[root@mina0 hadoop]# systemctl disable Network ...

  4. Linux:Vmware安装linux虚拟机,桥接方式配置静态IP后重启网卡,提示:Error,some other host already uses address 10.252.252.21...

    问题: Vmware安装linux虚拟机,桥接方式配置静态IP后重启网卡,提示:Error,some other host already uses address 10.252.252.21... ...

  5. 重启网卡报错:Device eth0 does not seem to be present

    ifconfig...没有看到eth0..然后重启网卡又报下面错误. 故障现象: service network restartShutting down loopback insterface:  ...

  6. linux中重启网卡后网络不通(NetworkManager篇)

    1.问题描述 RHEL7.6系统,使用nmcli绑定双网卡后,在使用以下命令重启network服务后主机网络异常,导致无法通过ssh远程登录系统. systemctl restart network ...

  7. Ubuntu重启网卡的三种方法

    一.network利用root帐户# service network restart 或者/etc/init.d/networking restart 二.ifdown/ifup# ifdown et ...

  8. linux -- Ubuntu14.04及之后版本重启网卡不生效

    Ubuntu14.04修改配置,重启网卡没有生效,出现如下问题: service networking restart //重启网络服务 stop: Job failed while stopping ...

  9. shell监控网卡状态,故障时自动重启网卡

      今天朋友找我写个监控网卡状态的脚本,要求在系统网卡挂了可以自己启动起来,这个要求是不是很bt,我考虑了半天,简单的写了个shell脚本来监控,实现原理是使用ping来测试网络连通性,如果不通就重启 ...

随机推荐

  1. SparkSQL开窗函数 row_number()

    开始编写我们的统计逻辑,使用row_number()函数 先说明一下,row_number()开窗函数的作用 其实就是给每个分组的数据,按照其排序顺序,打上一个分组内行号 比如说,有一个分组20151 ...

  2. 12个值得关注的顶级可视化JS库 涉及图表、动画、时间处理,表格操作

    本文是译文,原文是https://da-14.com/blog/top-11...我在原文的基础上加了百度的Echats图表库,这个也是毫不逊色其他图表库的.另外Handsontable电子表格库也是 ...

  3. bzoj4361:isn(dp+容斥+树状数组)

    题面 darkbzoj 题解 \(g[i]\)表示长度为\(i\)的非降序列的个数 那么, \[ ans = \sum_{i=1}^{n}g[i]*(n-i)!-g[i+1]*(n-i-1)!*(i+ ...

  4. thinkphp5.0 微信扫码支付模式二

    仅供个人参考,方便大家. 一.1)https://pay.weixin.qq.com/index.php/core/home/login  复制此地址 打开微信商户平台. 2)下载安全操作证书(最好在 ...

  5. 内核诊断(1)interrupt took too long

    The linux kernel gathers samples using 'perf' performance monitor without affecting the latencies. T ...

  6. java基本编译

    1.java语言严格区分大小写:1个源文件其中最多只能有一个public类:源文件必须和public类同名:每个类对应一个class字节码,且同名. 2.编译.   javac -d dir Hell ...

  7. (转)zabbix3.4使用percona-monitoring-plugins监控mysql

    原文:https://blog.csdn.net/yanggd1987/article/details/79656771 简介 之前主要使用nagios监控mysql,本文主要介绍使用percona- ...

  8. 【Eclipse】编译使用Makefile的C工程

    创建MakeFile project新建src文件夹,将文件复制到里面.右击makefile,make targets->create->名称填上allmake targets->b ...

  9. Window10安装Django,并创建第一个Django项目

    1.在cmd中输入pip install Django==1.11.7,安装的版本为:1.11.7. 2.安装完成后输入: >>> import django >>> ...

  10. Winform为窗体增加快捷键

    1. 定义窗体的 xxx_KeyDown(object sender, EventArgs e) 2. 书写快捷键的代码: //这里的xxx代表你的窗体名 private void xxxx_KeyD ...