|
Bugzilla – Full Text Bug Listing |
| Summary: | can not enable/disable a system service in a single runlevel | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 11.1 | Reporter: | yc wang <wangyc0307> |
| Component: | YaST2 | Assignee: | Dr. Werner Fink <werner> |
| Status: | RESOLVED WONTFIX | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Normal | ||
| Priority: | P5 - None | CC: | grey-olli, puzel, wangyc0307, werner |
| Version: | Final | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | openSUSE 11.1 | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
the screenshot of what I was doing
insserv-1.12.0-22.24.i586.rpm insserv-1.12.0-22.24.x86_64.rpm |
||
|
Description
yc wang
2009-01-29 16:20:50 UTC
Created attachment 268682 [details]
the screenshot of what I was doing
Yes, this is reproducible with another service I tried: YaST called this command Service.ycp:241 Calling /sbin/insserv -f /etc/init.d/smt,start=5 But the service had been enabled in Default-Start instead of runlevel 5 only (I did that on service disabled in all levels). /etc/init.d/smt contains (header): ### BEGIN INIT INFO # Provides: smt # Required-Start: $local_fs $remote_fs $network mysql apache2 cron # X-UnitedLinux-Should-Start: $local_fs $remote_fs $network mysql ypclient apache2 cron # Required-Stop: $local_fs $remote_fs $network # X-UnitedLinux-Should-Stop: # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: SMT - Subscription Management Tool for SLE # Description: Handles SMT service by apache2 with plugins, mysql and cron ### END INIT INFO Reassigning to the insserv maintainer... If you call /sbin/insserv -f /etc/init.d/smt,start=5 then you get runlevel 5 as you are overwriting the default runlevel specified in the file /etc/init.d/smt this is how it works and this is how it is readable in man insserv. It seems that if you call /sbin/insserv -f /etc/init.d/smt,start=n, then BOTH the default runlevel AND the n runlevel(if it's not in the default runlevel) will be enabled. Maybe this is the way it had been designed. But for me, as a end user, I don't really care how /sbin/insserv works and what the default runlevel is. What I want is to enable a specified runlevel, as ticking the corresponding check box, and I don't hope the default runlevel is enabled too. So can this be satisfied simply with YaST? Thanks. It seems that if you call /sbin/insserv -f /etc/init.d/smt,start=n, then BOTH the default runlevel AND the n runlevel(if it's not in the default runlevel) will be enabled. Maybe this is the way it had been designed. But for me, as a end user, I don't really care how /sbin/insserv works and what the default runlevel is. What I want is to enable a specified runlevel, as ticking the corresponding check box, and I don't hope the default runlevel is enabled too. So can this be satisfied simply with YaST? Thanks. I'll not change insserv. The default runlevels are a hard requirement
otherwise the system may not boot correct. If you really want to
ignore the system default you may use an overwrite file:
mkdir -p /etc/insserv/overrides
sed -rn '/^### BEGIN INIT INFO/,/^### END INIT INFO/{
s/(.*Default-Start:[[:blank:]]*).*/\15/
p
}' < /etc/init.d/smt > /etc/insserv/overrides/smt
this is curently the only way to not only add an additional runelvel
but remove the default values intended by the author of the script.
Created attachment 274646 [details]
insserv-1.12.0-22.24.i586.rpm
insserv allowing to disregard default run levels of scripts with
option -f.
Created attachment 274647 [details]
insserv-1.12.0-22.24.x86_64.rpm
insserv allowing to disregard default run levels of scripts with
option -f.
You may try out one of the above attachments with a insserv allowing to disregard default run levels if option -f is specified ... but this will not become part of openSuSE 11.1. Thank you for the bug-470654_insserv-1.12.0-22.24.i586.rpm, it worked. However I still think the design is kind of strange: It's not that you can't disable the service in default runlevels -- you can disable it in all default runlevels, *but* you can't disable it respectively, for example, you can't disable it in runlevel 3 while enabling it in runlevel 5, Do the two runlevels interact? Actually, I used to use Fedora, and its system-config-service utility can do what I expect. So I thought openSUSE was supposed to do that too. Anyway, I won't ask for that again, and thanks very much for your help *** Bug 482532 has been marked as a duplicate of this bug. *** |