错误信息:

红帽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. leetcode-77-组合

    题目描述: 给定两个整数 n 和 k,返回 1 ... n 中所有可能的 k 个数的组合. 示例: 输入: n = 4, k = 2 输出: [ [2,4], [3,4], [2,3], [1,2], ...

  2. Vue 不睡觉教程1-从最土开始

    目标最近在学习vue的过程中发现网上的vue教程总有些不同的问题,有的教程上来只说语法,有的教程上来就用vue-cli来建项目,但是vue-cli是整合了webpack等多个插件的工具,不利于我们学习 ...

  3. BurpSuite系列----Extender模块(扩展器)

    一.简介 Burp在软件中提供了支持第三方拓展插件的功能,方便使用者编写自己的自定义插件或从插件商店中安装拓展插件.Burp扩展程序可以以多种方式支持自定义Burp的行为,例如:修改HTTP请求和响应 ...

  4. "[Vue warn]: Failed to mount component: template or render function not defined"错误的解决

    VUE中动态路由出错: vue.esm.js?a026: [Vue warn]: Failed to mount component: template or render function not ...

  5. 教你制作自己logo专属的图片

    说明:以下教程仅适合对图片分辨率要求不高的情况. 第一步:使用Windows自带的画图工具新建一个250像素*250像素的空白图片. 第二步:使用形状中的三角形,按住Shift键,将三角形拖拉至合适的 ...

  6. [JZOJ6088] [BZOJ5376] [loj #2463]【2018集训队互测Day 1】完美的旅行【线性递推】【多项式】【FWT】

    Description Solution 我们考虑将问题一步步拆解 第一步求出\(F_{S,i}\)表示一次旅行按位与的值为S,走了i步的方案数. 第二步答案是\(F_{S,i}\)的二维重复卷积,记 ...

  7. hiho# 1394最小路径覆盖 网络流拆点

    题目传送门 思路: 观察到路径上除了终点起点以外的每个点出度和入度都为1,和网络流的拆点很像,所以就把每个点都拆成两个点,若存在一条路径$(u,v)$,则建一条$(u,v+n,1)$的边,然后求出最大 ...

  8. hadoop-2.6.0.tar.gz的集群搭建(3节点)(不含zookeeper集群安装)

    前言 本人呕心沥血所写,经过好一段时间反复锤炼和整理修改.感谢所参考的博友们!同时,欢迎前来查阅赏脸的博友们收藏和转载,附上本人的链接http://www.cnblogs.com/zlslch/p/5 ...

  9. 看过ruby相关书籍

    <ruby编程语言> <crafting rails applications> <agile web developemnt> <build awesome ...

  10. IOS折线图

    做项目要统计商品的销售情况,美工那边给了效果图,自己就按照效果图自定义了一个ScrollView.整体效果不错,在做的过程中遇到的问题也记录一下. 现在这个还有许多优化的地方: 1.一个表中只能画一个 ...