错误信息:

红帽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. javascript举例介绍事件委托的典型使用场景

    在了解什么是DOM事件以及给DOM事件绑定监听器的几种方法后,我们来谈谈事件委托. 1. e.target 和 e.currentTarget 当我们给目标元素target 绑定一个事件监听器targ ...

  2. Ubuntu18.04配制阿里巴巴的源

    配制阿里巴巴的源步骤 使用阿里巴巴的开源镜像:https://opsx.alibaba.com/mirror 然后选择ubuntu的帮助选项,复制ubuntu18.04镜像源 设置root账户密码: ...

  3. 9. Javascript学习笔记——表单处理

    9. 表单处理 9.1 表单的基础知识 ///表单用 <form> 元素表示,对应的是 HTMLFormElement 类型,继承自 HTMLElement. //属性:action.me ...

  4. 第五届CCPC河南省赛参赛有感

    10点开始,不过两次推迟了10分钟,也就是10点20开始.然后真的开始了,我还以为还会推迟10分钟. 比赛从密码输错开始,到瞎改代码疯狂提交结束. 输错密码,耽误了一点时间.点开签到题<文本修改 ...

  5. Centos7安装python3.7.1并与python2共存

    转自:http://www.cnblogs.com/JahanGu/p/7452527.html参考:https://www.jb51.net/article/104326.htm 1. 备份原来的p ...

  6. 【Kafka】Consumer配置

    从0.9.0.0开始,下面是消费者的配置. 名称 描述 类型 默认值 bootstrap.servers 消费者初始连接kafka集群时的地址列表.不管这边配置的什么地址,消费者会使用所有的kafka ...

  7. HUE配置文件hue.ini 的Spark模块详解(图文详解)(分HA集群和HA集群)

    不多说,直接上干货! 我的集群机器情况是 bigdatamaster(192.168.80.10).bigdataslave1(192.168.80.11)和bigdataslave2(192.168 ...

  8. 多线程编程(二)-Exchanger的使用

    Exchanger的介绍 类Exchanger的功能可以使两个线程之间传输数据. 方法exchange()的使用 package com.wjg.unit; import java.util.conc ...

  9. 为什么各大网站都纷纷用起了https?哪些网站需要https(SSL证书)

    其实最近我也在易维信网站的开发组内讨论应用全站https事宜. 其原因非常简单. 因为不断接到用户投诉说网站上出现影响浏览体验的大面积广告. 可是网站平常只针对未登录用户在顶栏和底栏打两小条广告.而且 ...

  10. Java泛型的协变

    在上篇<Java泛型的基本使用>这篇文章中遗留以下问题,即将子类型也能添加到父类型的泛型中,要实现这种功能必须借助于协变. 实验准备 现在在上篇文章展示的Decorator类型的基础上,增 ...