大网数据广告活动
服务器运维问答

How to change the linux startup services order in SUSE 11

· 52CE 我爱测

In RedHat and Centos changing the startup scripts as stated here worked perfectly fine. But Suse seems to follow different rules, if so what are the changes need to be taken into consideration? Do "CHKCONFIG" in init scripts will…

问题原文

原帖链接 · forum.test17 · CC BY-SA 3.0

In RedHat and Centos changing the startup scripts as stated here worked perfectly fine.

But Suse seems to follow different rules, if so what are the changes need to be taken into consideration?

Do "CHKCONFIG" in init scripts will have any effect of the starting order of services?

已采纳解答

原帖链接 · Diamond · CC BY-SA 3.0

In Suse start and stop order of services are managed by insserv package and based on dependency with other services. So it is little different. The answer to your question is given in details with examples in the following Suse article:

Manipulating the start and stop order of Linux services

Under the LSB (Linux Standards Base), the start and stop order of services is controlled using the "insserv" package. Unlike Netware, DOS and other operating systems, SUSE calculates the start and stop orders based on dependencies. This idiosyncrasy of Linux has the distinct advantage of providing a faster boot time, but does make things a little more complex.

examples

Here are few examples of how to manipulate the header of a service defined in /etc/init.d.

The following example will start Service "myService" after the network has loaded and will automatically start the service "myOtherService"

### BEGIN INIT INFO
# Provides:        myService
# Required-Start: $network
# Should-Start:   myOtherService
# Required-Stop:
# Should-Stop:
# Default-Start:  2 3 5
# Default-Stop:
# Description:    Example Service
### END INIT INFO

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-02-08)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。