在/etc/rc.d/init.d/下手工撰写一个virbr0文件,执行:
root@ keredhat init.d]# chmod a+x virbr0
root@ keredhat init.d]# chkconfig --add virbr0
出现如下错误提示:
service virbr0 does not support chkconfig
service virbr0 does not support chkconfig
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
参照系统自带服务脚本,添加以下代码
#chkconfig: 345 61 61
//此行的345参数表示在哪些运行级别启动,启动序号(S61);关闭序号(K61)
#description: shutdown virbr0 interface //此行必写,描述服务
#processname:virbr0
#description: shutdown virbr0 interface //此行必写,描述服务
#processname:virbr0
root@ keredhat init.d]# chkconfig --add virbr0 .
再次添加服务通过
转载于:https://blog.51cto.com/kekuk/856266