错误信息:

红帽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. jQuery css()与class()的用法

    一.css()用法:   1.设置css // css(name, value) // 修改单个样式 // name:样式名 value:样式值 $("li") .css(&quo ...

  2. Oracle数据库学习(四):学习中的遇到的问题

    一.xhost图形化界面安装问题 问题1:运行xhost +命令,出现命令没有找到错误 原因:Linux系统没有安装xhost图形化包. 解决办法:安装xhost图形化包,命令如下: yum what ...

  3. 01-django项目环境搭建

    一.Web应用框架----Django http服务器:用来接受用户请求,并将请求转发给web应用框架进行处理. Web应用框架处理完以后再发送给http服务器,http服务器再返回给用户 二.工具准 ...

  4. (转)jieba中文分词的.NET版本:jieba.NET

    简介 平时经常用Python写些小程序.在做文本分析相关的事情时免不了进行中文分词,于是就遇到了用Python实现的结巴中文分词.jieba使用起来非常简单,同时分词的结果也令人印象深刻,有兴趣的可以 ...

  5. 使用webpack && react环境

    使用webpack webpack是一款模块化的打包工具,它认为所有的文件都是模块,包括js,css等等,版本为2.x推荐学习,1.x版本已废弃,不建议使用. 目前,facebook官方就是使用web ...

  6. (java/javascript) list 交集 并集 差集 去重复并集

    java list 交集 并集 差集 去重复并集 package com; import java.util.ArrayList; import java.util.Iterator; import ...

  7. mysql经典查询

    建立数据库 1.建立一个数据库 create database work; 2.进入数据库work use work; 3.数据库默认编码可能不支持中文,可以在这里设置下 set names gbk; ...

  8. [中英对照]The sysfs Filesystem | sysfs文件系统

    The sysfs Filesystem | sysfs文件系统 Abstract | 摘要 sysfs is a feature of the Linux 2.6 kernel that allow ...

  9. 《TCP/IP详解》

    TCP/IP概述 Transmission Control Protocol/Internet Protocol的简写,中译名为传输控制协议/因特网互联协议,又名网络通讯协议,是Internet最基本 ...

  10. 相对布局--RelativeLayout

    <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android=&q ...