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. python之线程queue

    线程queue介绍 Queue的种类: FIFO:  Queue.Queue(maxsize=0) FIFO即First in First Out,先进先出.Queue提供了一个基本的FIFO容器,使 ...

  2. JSON.stringify时间的问题

    使用Element UI控件el-date-picker后台传值用到JSON.stringify转换字符串传后台发现输出国际标准时间(ISO),减少了8个小时, 解决方式: 由于JSON.string ...

  3. thinkPHP的几个系统常量

    echo "当前请求:" . __SELF__ . '<br>'; echo "当前分组:" . __MODULE__ . '<br>' ...

  4. 【MUI框架】学习笔记整理 Day 1

    MUI 框架之 [原生UI] (1)accordion(折叠面板) 由二级列表演化而来 <ul class="mui-table-view"> 2 <li cla ...

  5. c# 异步和同步问题(转载)

    [C#] 谈谈异步编程async await   为什么需要异步,异步对可能起阻止作用的活动(例如,应用程序访问 Web 时)至关重要. 对 Web 资源的访问有时很慢或会延迟. 如果此类活动在同步过 ...

  6. JAVA 分布式 - 分布式介绍

    什么是分布式系统? 要理解分布式系统,主要需要明白一下2个方面: 1.分布式系统一定是由多个节点组成的系统. 其中,节点指的是计算机服务器,而且这些节点一般不是孤立的,而是互通的. 2.这些连通的节点 ...

  7. js map()处理数组和对象数据

    之前的文章梳理了JS数组与对象属性的遍历方法,本文介绍专门用以遍历并处理数据的map()方法. 一.原生map() map()是数组的一个方法,它创建一个新数组,其结果是该数组中的每个元素都调用一个提 ...

  8. web.xml里welcome-file欢迎页面配置及web.xml简介

    web项目欢迎页面的配置 <welcome-file-list> <welcome-file>/WEB-INF/index.html</welcome-file> ...

  9. mysql navicat 及命令行 创建、删除数据库

    1.命令行创建数据库 create database mybatis default character set utf8 collate utf8_general_ci; drop database ...

  10. 在技术胖博客上学习ES6遇到的坑和想法

    第一节:ES6的开发环境搭建 坑1:全局安装babel-cli已经不被官方推荐,改为局部安装(cnpm install babel-cli --save-dev): 坑2:babel src/inde ...