惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 聂微东
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
LangChain Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
Blog — PlanetScale
Blog — PlanetScale
J
Java Code Geeks
Y
Y Combinator Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
GbyAI
GbyAI
Vercel News
Vercel News
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
Jina AI
Jina AI
B
Blog
Recorded Future
Recorded Future
MyScale Blog
MyScale Blog
I
InfoQ
aimingoo的专栏
aimingoo的专栏
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
腾讯CDC
爱范儿
爱范儿
Last Week in AI
Last Week in AI
博客园 - 三生石上(FineUI控件)
博客园 - Franky
Schneier on Security
Schneier on Security
V
V2EX
TaoSecurity Blog
TaoSecurity Blog
H
Hacker News: Front Page
Cloudbric
Cloudbric
D
DataBreaches.Net
B
Blog RSS Feed
P
Palo Alto Networks Blog
云风的 BLOG
云风的 BLOG
NISL@THU
NISL@THU
I
Intezer
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cyberwarzone
Cyberwarzone
F
Fortinet All Blogs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
C
Cisco Blogs
K
Kaspersky official blog
Forbes - Security
Forbes - Security

博客园 - 可可

广东电信最新DNS更新了 分布式缓存失效处理 序列化 suse中计划任务工具cron的使用 转载《.NET框架设计之五------------异常设计(异常与返回值)》 《高级Bash脚本编程指南》在线阅读 转载《Linux Shell Bash 各种小技巧》 Linux多线程例子 转载《Adding a Second IP Address to an Existing Network Adapter on Linux》 SuSE下chkconfig的启动脚本参考例子"/etc/init.d/skeleton” - 可可 - 博客园 linux下c++程序编译错误--理解typename 一个公网IP情况下实现LVS VS/DR vmware中suse10不能上网解决方法 Using PHP with mod_fcgid Apache Configuration PHP在Apache中两种工作方式的区别(CGI模式、Apache 模块DLL) SSO 转贴《负载均衡技术介绍》 CDN
转载《Starting and Stoping Services: insserv》
可可 · 2009-05-14 · via 博客园 - 可可

http://susefaq.sourceforge.net/faq/services.html

Starting and Stoping Services

SuSE is using insserv to control the runlevel links in an automatic fashion. This section tries to address questions related to creating and maintaing runlevel links.

1. How can I start services at boot time ?
2. Why do my runlevel symlinks change order ?
3. I can't find chkconfig where is it ?
4. How can I stop hwscan from starting at boot time ?
1.

How can I start services at boot time ?

To start a service:
$ insserv named
            
To stop a service from starting:
 $ insserv -r named
            

Note

You can also use ->->+Runlevel properties

Have a look at insserv(8) manual page for in detail explanations.

INSSERV(8)            The SuSE boot concept            INSSERV(8)
            Insserv - Enable an installed system init script
            Enables an installed  system  init  script  (`boot
            script')  by  reading  the  comment  header of the script,
            e.g.:
            ### BEGIN INIT INFO
            # Provides:       boot_facility_1 [ boot_facility_2 ...]
            # Required-Start: boot_facility_1 [ boot_facility_2 ...]
            # Required-Stop:  boot_facility_1 [ boot_facility_2 ...]
            # Default-Start:  run_level_1 [ run_level_2 ...]
            # Default-Stop:   run_level_1 [ run_level_2 ...]
            # Description:    multiline_description
            ### END INIT INFO
            and calculating  the  dependencies  between  all  scripts.
            

If you are interested in making your own init script for a custom program to start at boot time look at /etc/init.d/skeleton. You can use this example to create your own.

2.

Why do my runlevel symlinks change order ?

"insserv", is changing the run level links. Every time a package including an init script is being installed, it calls insserv in its %post section to install the required run level links. Have a look at the insserv(8) and init.d(7) man pages. Probably your init script is lacking the required comments in the header that determine the default run levels and startup dependencies (as specified by the LSB).

Tip

Have a look at SuSE Package Conventions document if you are creating your own rpms or for a deeper understanding of SuSE RPM internals. Note that this document is still work in progress...

3.

I can't find chkconfig where is it ?

Applies to SuSE 8.0

The equivalent is insserv, refer to the previous question for detailed info about man pages and other explanations.

CHKCONFIG(8)                                         CHKCONFIG(8)
            NAME
            chkconfig - enable or disable system services
            SYNOPSIS
            chkconfig -t|--terse [names]
            chkconfig -s|--set [name state]
            chkconfig -e|--edit [names]
            chkconfig -l|--list [--deps] [names]
            chkconfig -a|--add [names]
            chkconfig -d|--del [names]
            DESCRIPTION
            chkconfig  is used to manipulate the runlevel links at boot time
            (see init.d(7)).  It can be thought of as a frontend to insserv(8).
            Chkconfig can run in six different  modes:  terse  list  mode,  set
            mode,  edit mode, list mode, add mode and delete mode. The last three
            modes were added for compatibility reasons
            
4.

How can I stop hwscan from starting at boot time ?

  1. Fire up YAST

  2. Select "System"

  3. Select "Runlevel Editor"

  4. Select "Runlevel Properties"

  5. Select (from list) "hwscan"

  6. Click "Set/Reset"

  7. Select "Disable the service"

  8. Click "Finish"

An alternative procedure is as follows

It's a service called "hwscan", started from the Links in /etc/init.d/rcX.d where X is your runlevel. To see in which runlevels your script is invoked :

# chkconfig -l script
            

Normally you could remove the scripts with:

# insserv -r script
            

in your case:

# insserv -r hwscan