Center OS 7 /etc/rc.d/init.d/network, status=6

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.

猜你喜欢

转载自www.cnblogs.com/antis/p/10593663.html
今日推荐