[opensuse] seek answer for boot sequence
Hi, all: I want to make one of my init.d script *START* in the END of bootup process, and meanwhile, *STOP* in the END of shutdown/reboot process. On redhat, I can just change the numbers to adjust the boot/shutdown order of my init.d scripts. Can I do the same on openSUSE? I am not quite familiar with the dependency things. Thanks in advance. -- Best Regards. -Tian -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
aXqd a écrit :
Hi, all:
I want to make one of my init.d script *START* in the END of bootup process, and meanwhile, *STOP* in the END of shutdown/reboot process.
On redhat, I can just change the numbers to adjust the boot/shutdown order of my init.d scripts. Can I do the same on openSUSE? I am not quite familiar with the dependency things.
Thanks in advance. yes, of course jdd
-- http://www.dodin.net http://valerie.dodin.org http://news.opensuse.org/2009/04/13/people-of-opensuse-jean-daniel-dodin/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, Jul 28, 2009 at 2:54 PM, jdd (kim2)
yes, of course jdd
Do you mean I can use '# chkconfig: 345 28 72' directive? It does not work. Am I missing something here? -- Best Regards. -Tian -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
aXqd wrote:
On Tue, Jul 28, 2009 at 2:54 PM, jdd (kim2)
wrote: yes, of course jdd
Do you mean I can use '# chkconfig: 345 28 72' directive? It does not work. Am I missing something here?
Yeah - I don't think the openSUSE sysinit supports a straight numbering/priority scheme. (I could be wrong, I've never tried it). I think you'll need to add your script with the correct dependencies, then insert it into the sequence with insserv. /Per -- Per Jessen, Zürich (18.2°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, Jul 28, 2009 at 4:54 PM, Per Jessen
Yeah - I don't think the openSUSE sysinit supports a straight numbering/priority scheme. (I could be wrong, I've never tried it). I think you'll need to add your script with the correct dependencies, then insert it into the sequence with insserv.
Just as I said before, I am not quite familiar with insserv and those dependency directives. I am still struggling to find a way to indicate the right dependencies to put that script the end of startup process, but also the end of halt/reboot process. IMHO, by default, these two are just reversed. -- Regards. -Tian -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
aXqd a écrit :
to put that script the end of startup process, but also the end of halt/reboot process. big numbers are at the end, small numbers at the beginning (I think). If you need booting at the very first or very end, no dependency problem
jdd -- http://www.dodin.net http://valerie.dodin.org http://news.opensuse.org/2009/04/13/people-of-opensuse-jean-daniel-dodin/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, Jul 28, 2009 at 6:30 PM, jdd (kim2)
I always have changed this manually (rename the file)
Sorry, it's not my call. I was told to follow the LSB.
big numbers are at the end, small numbers at the beginning (I think). If you need booting at the very first or very end, no dependency problem
What would happen if I change it manually, and some time later, customers use insserv to adjust it? Is there a safe way to go? -- Regards. -Tian -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
aXqd wrote:
On Tue, Jul 28, 2009 at 6:30 PM, jdd (kim2)
wrote: I always have changed this manually (rename the file)
Sorry, it's not my call. I was told to follow the LSB.
Then you have no choice but to read up on the dependencies of the sysvinit scripts.
What would happen if I change it manually, and some time later, customers use insserv to adjust it?
As long as you've added the correct dependencies, it should work fine. /Per -- Per Jessen, Zürich (20.1°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, Jul 28, 2009 at 6:47 PM, Per Jessen
On Tue, Jul 28, 2009 at 6:30 PM, jdd (kim2)
wrote: I always have changed this manually (rename the file)
Sorry, it's not my call. I was told to follow the LSB.
Then you have no choice but to read up on the dependencies of the sysvinit scripts.
What would happen if I change it manually, and some time later, customers use insserv to adjust it?
As long as you've added the correct dependencies, it should work fine.
Thank you all for your reply. Let me make my question more specific. How can I use *dependency* way to start my script after xdm starts and stop it after xdm and splash-late stop? By doing this, I can fix a tedious bug. -- Best Regards. -Tian -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
aXqd wrote:
On Tue, Jul 28, 2009 at 6:47 PM, Per Jessen
wrote: On Tue, Jul 28, 2009 at 6:30 PM, jdd (kim2)
wrote: I always have changed this manually (rename the file)
Sorry, it's not my call. I was told to follow the LSB.
Then you have no choice but to read up on the dependencies of the sysvinit scripts.
What would happen if I change it manually, and some time later, customers use insserv to adjust it?
As long as you've added the correct dependencies, it should work fine.
Thank you all for your reply. Let me make my question more specific. How can I use *dependency* way to start my script after xdm starts and stop it after xdm and splash-late stop?
Okay, let's have a look: /etc/init.d/xdm - contains "Provides: xdm". This gives you a hint that your script might/will need: "Required-Start: xdm". I don't have a splash_late script on my system, but to run your script late in shutdown, maybe "Required-Stop: $network" will do.
By doing this, I can fix a tedious bug.
an openSUSE bug? /Per -- Per Jessen, Zürich (20.4°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
2009-7-28, 19:23, Per Jessen
Okay, let's have a look:
/etc/init.d/xdm - contains "Provides: xdm".
This gives you a hint that your script might/will need:
"Required-Start: xdm".
I don't have a splash_late script on my system, but to run your script late in shutdown, maybe "Required-Stop: $network" will do. According to my test, Required-stop did not work properly. Although it might be my mistake. :(
By doing this, I can fix a tedious bug.
an openSUSE bug? I believe it's an integration bug... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
aXqd wrote:
2009-7-28, 19:23, Per Jessen
: Okay, let's have a look:
/etc/init.d/xdm - contains "Provides: xdm".
This gives you a hint that your script might/will need:
"Required-Start: xdm".
I don't have a splash_late script on my system, but to run your script late in shutdown, maybe "Required-Stop: $network" will do.
According to my test, Required-stop did not work properly. Although it might be my mistake. :(
someone already mentioned that the man-page for insserv says 'Required-Stop' doesn't work or is ignored. I have never had to be careful with when something is shut down, so I probably can't help you much more. /Per -- Per Jessen, Zürich (21.9°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
someone already mentioned that the man-page for insserv says 'Required-Stop' doesn't work or is ignored. I have never had to be careful with when something is shut down, so I probably can't help you much more. That *someone* would be me :) I don't know if that document is up-to- date. Thanks anyway for your input. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
aXqd wrote:
I want to make one of my init.d script *START* in the END of bootup process, and meanwhile, *STOP* in the END of shutdown/reboot process.
and later aXqd wrote:
Thank you all for your reply. Let me make my question more specific. How can I use *dependency* way to start my script after xdm starts and stop it after xdm and splash-late stop? By doing this, I can fix a tedious bug.
When I read this, alarm bells go off in my head; let me tell you why. Firstly, these two goals are not equivalent. boot occurs once per boot :) xdm can be restarted many times. Of more concern to me is that starting something at the end of bootup and stopping it at the end of shutdown is very unusual, because the environments will be very different at these times. Most processes start up and shut down at the same environment level - they nest with other process lifetimes. So normally it would be an error to do what you want to do. But you may have some special requirement; please accept my apologies if so. Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
aXqd wrote:
I want to make one of my init.d script *START* in the END of bootup process, and meanwhile, *STOP* in the END of shutdown/reboot process.
and later aXqd wrote:
Thank you all for your reply. Let me make my question more specific. How can I use *dependency* way to start my script after xdm starts and stop it after xdm and splash-late stop? By doing this, I can fix a tedious bug.
When I read this, alarm bells go off in my head; let me tell you why.
Firstly, these two goals are not equivalent. boot occurs once per boot :) xdm can be restarted many times. Yes, you are right. I just want to simplify the question at first place. Of more concern to me is that starting something at the end of bootup and stopping it at the end of shutdown is very unusual, because the environments will be very different at these times. Most processes start up and shut down at the same environment level - they nest with other process lifetimes. So normally it would be an error to do what you want to do. But you may have some special requirement; please accept my apologies if so. Yes. It is abnormal. So it is a little tedious to find the right way. I want to do this just because, if I manually adjust the order like this, my bug go away. And we are sort of running out of time to find the root cause to change the binary. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, 2009-07-28 at 17:01 +0800, aXqd wrote:
On Tue, Jul 28, 2009 at 4:54 PM, Per Jessen
wrote: Yeah - I don't think the openSUSE sysinit supports a straight numbering/priority scheme. (I could be wrong, I've never tried it). I think you'll need to add your script with the correct dependencies, then insert it into the sequence with insserv.
Just as I said before, I am not quite familiar with insserv and those dependency directives. I am still struggling to find a way to indicate the right dependencies to put that script the end of startup process, but also the end of halt/reboot process. IMHO, by default, these two are just reversed.
I think (not 100% positive) it is: # Required-Start: $all Then the script is put last. Look at the insserv man page. This is described just before the options. Probably similar for Stop. If there is a specific script you want to follow, find out what it has for "Provides:", and put that in your "Required-Start:" list. -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 8-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, Jul 28, 2009 at 6:36 PM, Roger Oberholtzer
I think (not 100% positive) it is:
# Required-Start: $all
Then the script is put last. Look at the insserv man page. This is described just before the options. Probably similar for Stop.
If there is a specific script you want to follow, find out what it has for "Provides:", and put that in your "Required-Start:" list.
Yes, but if I take this way, the shutdown/reboot process sequence is not satisfied. According to http://man-wiki.net/index.php/8:insserv, It reads: 'Required-Stop, Should-Stop, and Default-Stop are ignored in SuSE Linux, because the SuSE boot script concept uses a differential link scheme'. Is that true? -- Regards. -Tian -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, 2009-07-28 at 18:40 +0800, aXqd wrote:
On Tue, Jul 28, 2009 at 6:36 PM, Roger Oberholtzer
wrote: I think (not 100% positive) it is:
# Required-Start: $all
Then the script is put last. Look at the insserv man page. This is described just before the options. Probably similar for Stop.
If there is a specific script you want to follow, find out what it has for "Provides:", and put that in your "Required-Start:" list.
Yes, but if I take this way, the shutdown/reboot process sequence is not satisfied.
According to http://man-wiki.net/index.php/8:insserv, It reads: 'Required-Stop, Should-Stop, and Default-Stop are ignored in SuSE Linux, because the SuSE boot script concept uses a differential link scheme'. Is that true?
Probably. But I think it is effected by the Start sequence. If you add a script with "# Required-Start: $all", (1) does it get put at the end of all run level start scripts, and (2) where is it in the stop sequence? A dummy script that does nothing can't hurt playing with. I am not sure about making links outside the ones insserv does. I seem to recall I did this and my script did not get treated as I wanted. insserv does not look at existing links. It only looks at the directives in the files in /etc/init.d. -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 8-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Probably. But I think it is effected by the Start sequence. If you add a script with "# Required-Start: $all", (1) does it get put at the end of all run level start scripts, and (2) where is it in the stop sequence? I think it modifies the stop sequence too. Is that the reason why suse do not support *-STOP directives? A dummy script that does nothing can't hurt playing with. I am not sure about making links outside the ones insserv does. I seem to recall I did this and my script did not get treated as I wanted. insserv does not look at existing links. It only looks at the directives in the files in /etc/init.d. Yes, it is not quite intuitive to me... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
aXqd wrote:
On Tue, Jul 28, 2009 at 4:54 PM, Per Jessen
wrote: Yeah - I don't think the openSUSE sysinit supports a straight numbering/priority scheme. (I could be wrong, I've never tried it). I think you'll need to add your script with the correct dependencies, then insert it into the sequence with insserv.
Just as I said before, I am not quite familiar with insserv and those dependency directives.
Okay, then you'll have to add your script manually by creating the S* and K* symlinks by hand.
I am still struggling to find a way to indicate the right dependencies to put that script the end of startup process, but also the end of halt/reboot process. IMHO, by default, these two are just reversed.
Nothing default about it, but create an S99 and a K99 link in the appropriate runlevel directory/ies, and I think you'll have your wish granted. /Per -- Per Jessen, Zürich (20.4°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
aXqd a écrit :
On Tue, Jul 28, 2009 at 2:54 PM, jdd (kim2)
wrote: yes, of course jdd
Do you mean I can use '# chkconfig: 345 28 72' directive? It does not work. Am I missing something here?
I always have changed this manually (rename the file) jdd -- http://www.dodin.net http://valerie.dodin.org http://news.opensuse.org/2009/04/13/people-of-opensuse-jean-daniel-dodin/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, Jul 28, 2009 at 2:42 AM, aXqd
Hi, all:
I want to make one of my init.d script *START* in the END of bootup process, and meanwhile, *STOP* in the END of shutdown/reboot process.
On redhat, I can just change the numbers to adjust the boot/shutdown order of my init.d scripts. Can I do the same on openSUSE? I am not quite familiar with the dependency things.
Thanks in advance. -- Best Regards. -Tian
Tian, If read the back and forth and it sounds like you are wanting to package up a app for release. If so, there is a opensuse-packagers mailinglist. You will likely get more comprehensive info there than here. This is for normal users of opensuse, so there are not very many packagers hanging around. Greg -- Greg Freemyer Head of EDD Tape Extraction and Processing team Litigation Triage Solutions Specialist http://www.linkedin.com/in/gregfreemyer Preservation and Forensic processing of Exchange Repositories White Paper - http://www.norcrossgroup.com/forms/whitepapers/tng_whitepaper_fpe.html The Norcross Group The Intersection of Evidence & Technology http://www.norcrossgroup.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Tian,
If read the back and forth and it sounds like you are wanting to package up a app for release.
If so, there is a opensuse-packagers mailinglist. You will likely get more comprehensive info there than here. This is for normal users of opensuse, so there are not very many packagers hanging around. Ok. I'll try there tomorrow. Thanks for mention that. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (6)
-
aXqd
-
Dave Howorth
-
Greg Freemyer
-
jdd (kim2)
-
Per Jessen
-
Roger Oberholtzer