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. Html dom 赋值

    1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="U ...

  2. 用bind方法保持this上下文

    什么是this对象 先来说说什么是this对象吧.每一个函数在调用的时候都会自己主动获取两个特殊变量:this和arguments对象. this值详细是指哪个对象是和该函数的运行环境相关的.假设是作 ...

  3. THINK PHP 学习笔记20171115

    Part1:框架目录project 应用部署目录 ├─application 应用目录(可设置) │ ├─common 公共模块目录(可更改) │ ├─index 模块目录(可更改) │ │ ├─co ...

  4. Anychart隐藏属性

    一.嵌入字体的使用 font标签可以使用嵌入字体,只需加入embed="true"即可.

  5. Java的工厂模式(二)

    除了上文提到的方法之外,还可以使用Java的反射机制,这样就能使用类名称来加载所需要的类.我们只需改变工厂类和驱动类就可以了. FruitFactory.java package com.muggle ...

  6. C# 设计模式·行为型模式

    这里列举行为型模式·到此23种就列完了···这里是看着菜鸟教程来实现··,他里边列了25种,其中过滤器模式和空对象模式应该不属于所谓的23种模式责任链模式:为请求创建一个接收者对象的链,对请求的发送者 ...

  7. K8S基础概念

    一.核心概念 1.Node Node作为集群中的工作节点,运行真正的应用程序,在Node上Kubernetes管理的最小运行单元是Pod.Node上运行着Kubernetes的Kubelet.kube ...

  8. webpack开发工具

    source map 用来调试打包后的代码 const path = require('path'); const HtmlWebpackPlugin = require('html-webpack- ...

  9. Html5不可见标签,及标签属性(元素对象属性) a href target name id 相对路径

    标签属性分类(元素对象属性) 不可见标签与可见标签: <head></head>        属于不可见标签, 里面的内容一般用于css还有全局的一些变量,声明等. 而且如果 ...

  10. apache ftp server的简单入门(java应用内嵌ftp server)

    Apache Ftp Server:(强调) Apache Ftp Server 是100%纯Java的FTP服务器软件,它采用MINA网络框架开发具有非常好的性能.Apache FtpServer ...