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. 手把手教你写一个java的orm(一)

    写之前的说明 其实吧. 这个东西已经写好了,地址在:https://github.com/hjx601496320/JdbcPlus 这系列文章算是我写的过程的总结吧.(恩系列,说明我可能会写好久,╮ ...

  2. Python 创建字典的多种方式

    1.通过关键字dict和关键字参数创建 >>> dic = dict(spam = 1, egg = 2, bar =3) >>> dic {'bar': 3, ' ...

  3. BZOJ4675: 点对游戏

    传送门 考虑每一对幸运点对的贡献,假设有 \(v\) 对 一共可以选择 \(x\) 个点,总共 \(n\) 个点 那么答案就是 \[v\times\frac{A_{n-2}^{x-2}x(x-1)}{ ...

  4. 慕课网 Ajax笔记

    Ajax技术实现: 运用HTML和CSS来实现页面,表达信息: 运用XMLHttpRequest和web服务器进行数据的异步交换: 运用JavaScript操作DOM,实现动态局部刷新: 同步:就是用 ...

  5. textarea 元素的 placeholder 属性不显示

    <textarea> 标签定义多行的文本输入控件. placeholder:描述文本区域预期值的简短提示. textarea 的 placeholder 属性值不显示的原因可能是 < ...

  6. Date()对象的设置与解析

    怎么获取当前时间? 怎么给Date对象设置特定时间? 将Date对象解析为毫秒数? 将Date对象解析为日月年?获取小时/分钟/秒? 直接new Date()新建对象,可以获取当前时间的Date对象: ...

  7. @Secured()、 @PreAuthorize() 、 @RolesAllowed()

    在Spring security的使用中,为了对方法进行权限控制,通常采用的三个注解,就是@Secured().@PreAuthorize().@RolesAllowed(). 示例,修改用户密码必须 ...

  8. idea插件Lombok

    在spring boot 中,我们可以使用@Data标签,这样就不需要手动添加getter/setter方法了,但Idea会报错. 此时,我们需要安装Lombok插件,安装好插件后便可以解决这个问题. ...

  9. 带你从零学ReactNative开发跨平台App开发[expo 打包发布](八)

    ReactNative跨平台开发系列教程: 带你从零学ReactNative开发跨平台App开发(一) 带你从零学ReactNative开发跨平台App开发(二) 带你从零学ReactNative开发 ...

  10. insufficient privileges for 'SYS' when 'shutdown immediate'

    SQL> select * from v$version; BANNER------------------------------------------------------------- ...