service network restart 报错 Center OS 7 /etc/rc.d/init.d/network status=6

google上找到答案:

Just in case anyone is still having an issue with Centos 7 on the Raspberry Pi in regard to this 'LSB' error.

I eventually found out that the /etc/rc.d/init.d/network script that is run, will error out right away with status=6 if a specific file does not exist, namely /etc/sysconfig/network.
I have no idea why this file is required, as on another system I work on the file exists but is empty. But it didn't exist out of the box with the Centos 7 OS I got for my Raspberry. After going through all other steps (remove Network Manager, set static IP in ifcfg file, kill dhc process for Network Manager, etc) if you still get this error just try:

touch /etc/sysconfig/network

The file can be empty. Just has to exist.

Then restart network service:

systemctl restart network

And voila. I realize this is a very small fix, but I went through all the headaches and tries above before finding this and I was good to go after.

Center OS 7 /etc/rc.d/init.d/network, status=6的更多相关文章

  1. /etc/rc.d/rc与/etc/rc.d/init.d的关系

    在这里先解释一下 /etc/rc.d/init.d 里面放的都是什么东西.这个目录存放的是一些脚本,一般是Linux以rpm包安装时设定的一些服务的启动/关闭脚本.系统在安装时装了好多rpm包,这里面 ...

  2. /etc/rc.d/与/etc/rc.d/init.d的关系

    /etc/init.d指向/etc/rc.d/init.d目录 . 除了直接调用脚本外(如/etc/rc.d/init.d/xinetd),还可以用service命令来控制init.d目录下的服务如 ...

  3. 【转】/etc/rc.d/rc与/etc/rc.d/init.d的关系介绍

    /etc/rc.d/init.d这个目录下的脚本就类似与windows中的注册表,在系统启动的时候执行.程序运行到这里(init进程读取了运行级别),相信从命名的角度大家也能猜到该运行/etc/rc. ...

  4. 对 /etc/rc.d/init.d 目录的一点理解

    转载 一.Linux的引导过程 系统启动之后,在进入init.d之前,我们先来看看系统都做了什么工作.系统加电之后,首先进行的硬件自检,然后是bootload对系统的初始化,加载内核. 内核被加载到内 ...

  5. center os 安装mysql5.6

    软件 MySQL-server-5.6.13-1.el6.x86_64.rpm MySQL-client-5.6.13-1.el6.x86_64.rpm 安装命令 rpm -ivh MySQL-ser ...

  6. Center OS 7安装 Apollo

    声明: 每个人的情况都不一样,所以大家在看教程的时候自行斟酌,最好先扫一遍,再来根据自身情况进行操作.同时,遇到的问题也可能不尽相同,要灵活处理. 了解: Apollo是从原始ActiveMQ的基础构 ...

  7. /etc/rc.d/init.d/iptables: No such file or directory 错误原因

    注:本文转载自cnblogs:一天学点的文章</etc/rc.d/init.d/iptables: No such file or directory 错误原因> RedHat Enter ...

  8. center os

    CentOS.Ubuntu.Debian三个linux比较异同 Center OS 7 安装 $$ center os 安装mysql5.6 Linux学习之Center os网络配置 Cent Os ...

  9. /etc/rc.d/init.d/functions文件详细分析

    /etc/rc.d/init.d/functions文件详细分析 functions这个脚本是给/etc/init.d里边的文件使用的(可理解为全局文件). 提供了一些基础的功能,看看里边究竟有些什么 ...

随机推荐

  1. C# list的合并

    转自:https://www.cnblogs.com/liguanghui/archive/2011/11/09/2242309.html List<int> listA = new Li ...

  2. Messenger与AIDL的异同

    Messenger与AIDL的异同 最近做项目需要使用进程间通信,大家知道应用层的进程间通信无非Broadcast,Activity,Service,Content Provider四大组件.Broa ...

  3. 前端框架 vue 和 react 的区别

    前言:最近需要使用 react,以前用过 vue,故来总结两者的区别. 首先React与vue有几点相同之处 1.都使用了Virtual DOM 2.提供了响应式(Reactive)和组件化(Comp ...

  4. MangoDB的C#驱动库(.net framewokr 4.0)

    编写运维工具,需要联接MangoDB 基于我陈旧的技术栈,就用c#开发了 驱动库下载地址记录到至此,需要的可以下载 注意,此驱动是老版本的,只支持.net framewokr 4.0 看了半天,觉得够 ...

  5. Implementation:UnionFindSet 并查集

    class UnionFindSet { private: int *pref; int *rank; int capacity; public: UnionFindSet(int n) { ) { ...

  6. cf623A. Graph and String(二分图 构造)

    题意 题目链接 Sol 可以这样考虑,在原图中没有边相连的点的值肯定是a / c 那么直接二分图染色即可 #include<bits/stdc++.h> #define LL long l ...

  7. Thymeleaf模板表达式

    日期格式.组件提取等. ${#dates.format(date)}${#dates.arrayFormat(datesArray)}${#dates.listFormat(datesList)}${ ...

  8. css的元素表现

    块级元素和行内元素的表现: 块级元素:块级元素和父元素的宽度一致,默认情况下就是和body的宽度一样,也可以说和浏览器窗口的宽度一致,致使同一行不能再放下另外的元素,所以块级元素表现为独占一行. 块级 ...

  9. 转:ubuntu 18.04 LTS 安装 java10(JDK) 及问题说明

    原文地址:ubuntu 18.04 LTS 安装 java10 及问题说明 1.下载相应的安装包,例如jdk-10.0.1_linux-x64_bin.tar.gz.下载地址: http://www. ...

  10. 打包jar问题

    一. 先说一下一般是动态布局最好,效率高,动态就是java写布局,这是 老外的专长,一般res目录是不能打包的,布局动态写,其余的就是图片什么的了,可以建一个assess文件夹,把图片放里面,打jar ...