错误信息:

红帽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. linux C API连接并查询mysql5.7.9

    开发环境: ubuntu16.04 mysql5.7.9 原生C API VIM 配置远程连接 配置mysql允许远程连接的方法默认情况下,mysql只允许本地登录,如果要开启远程连接,则需要修改/e ...

  2. 基于CH340的一键下载电路

    一.CH340简介 CH340 是一个 USB 总线的转接芯片,实现 USB 转串口或者 USB 转打印口.CH340是国产芯片,应用场合居多,市场占有率很高.常用的USB转串口芯片还有CP2102. ...

  3. jersey annotations

    参照: http://blog.csdn.net/a19881029/article/details/43056429 官网文档翻译版 @Path 用来为资源类或方法定义URI,当然除了静态URI也支 ...

  4. Error: Another program is already listening on a port that one of our HTTP servers is configured to use. Shut this program down first before starting

    解决方法: find / -name supervisor.sock unlink /name/supervisor.sock 2. www-data 用户是干什么用的 3.如何通过superviso ...

  5. hadoop完全分布式手动安装(一主多从centos linux各版本均试验成功,文档完整无一遗漏)

    hadoop完全分布式手动安装(一主多从centos linux各版本均试验成功,文档完整无一遗漏) 网上的文章99%都是垃圾,我凭良心书写,确保幼儿园同学也能安装成功! 查看系统环境    1.查看 ...

  6. 【Maven学习】maven基本命令

    maven最主要的命令如下: mvn clean compile:告诉Maven编译项目主代码 mvn clean test:执行src/test/main下面的test方法,在执行测试之前,会自动执 ...

  7. SymbolTable

    在ClassReader中有两个重要的属性,如下定义: /** A hashtable containing the encountered top-level and member classes, ...

  8. JavaScript数据结构-5.队列

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  9. js中in关键字的用法

    1. 在For...In 声明用于对数组或者对象的属性进行循环/迭代操作. 例子:var a = new Array; for(x in a){ console.log(x); } 2. 判断对象是否 ...

  10. teleport助手不可以使用剪切板的问题解决

    在使用teleport堡垒机的时候,你使用teleport助手会发现不可以使用剪切板,接下来就是解决方法. 解决办法:更新freerdp 基于环境:win10(win7下更新好像没有用),telepo ...