How to configure ORDER of runlevel services?
Hi: My MatLab flexlm script fails at boot because the install script put it as the first service to start, but it needs network up. It works fine if I start it manually after the system is up. I never realized that there seems to be no way to control the ORDER of services in the Yast|System|Runlevel Editor. Obviously I can do it by hand by changing the symlinks, but jeez, I think this is a serious deficiency. Certainly it is very important the order in which *some* services are started. Am I missing something? Shouldn't this be tweakable in Yast? Thanks. -- _____________________ Christopher R. Carlen crobc@earthlink.net SuSE 9.1 Linux 2.6.5
Chris Carlen wrote:
My MatLab flexlm script fails at boot because the install script put it as the first service to start, but it needs network up. It works fine if I start it manually after the system is up.
It seems your startup script is missing the insserv header section which determines the dependencies for startup order. I would suggest comparing it to another startup script and edit your script, then rerun insserv or Yast runlevel editor.
Am I missing something? Shouldn't this be tweakable in Yast?
man insserv, and /etc/init.d/skeleton. In short, this is not something Yast does but the one who writes the startup script. -- Joe Morris New Tribes Mission Email Address: Joe_Morris@ntm.org Registered Linux user 231871
On Sunday 29 August 2004 6:24 pm, Chris Carlen wrote:
Hi:
My MatLab flexlm script fails at boot because the install script put it as the first service to start, but it needs network up. It works fine if I start it manually after the system is up.
I never realized that there seems to be no way to control the ORDER of services in the Yast|System|Runlevel Editor.
Obviously I can do it by hand by changing the symlinks, but jeez, I think this is a serious deficiency. Certainly it is very important the order in which *some* services are started.
Am I missing something? Shouldn't this be tweakable in Yast?
Not in Yast, in the script itself. Your MatLab script needs to specify the services it needs to exist before starting, then insserv will take care of ordering the startup appropriately. Look at /etc/init.d/skeleton for an explanation, basically, the Matlab script needs # Required-Start: $network In its init block. Scott -- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.5-7.104-default x86_64
-----Original Message-----
From: Chris Carlen
Hi:
My MatLab flexlm script fails at boot because the install script put it as the first service to start, but it needs network up. It works fine if I start it manually after the system is up.
I never realized that there seems to be no way to control the ORDER of services in the Yast|System|Runlevel Editor.
Obviously I can do it by hand by changing the symlinks, but jeez, I think this is a serious deficiency. Certainly it is very important the order in which *some* services are started.
Am I missing something? Shouldn't this be tweakable in Yast?
Thanks.
Find these lines near the top of the init script, notice the "# Required-Start line" that states which services should be started prior to the start of your script. This one is taken from the named script in /etc/init.d. ## BEGIN INIT INFO # Provides: named # Required-Start: $network $remote_fs $syslog # Required-Stop: # Default-Start: 3 5 # Default-Stop: # Description: Starts internet domain name server (DNS) BIND 9 ### END INIT INFO Adjust your script accordingly and insserv -d and it should adjust the point at which it starts. Ken
On Sunday 29 August 2004 08:24 pm, Chris Carlen wrote:
I never realized that there seems to be no way to control the ORDER of services in the Yast|System|Runlevel Editor.
Obviously I can do it by hand by changing the symlinks, but jeez, I think this is a serious deficiency. Certainly it is very important the order in which *some* services are started.
Am I missing something? Shouldn't this be tweakable in Yast?
Haven't seen a way in yast, but try SysV-Init Editor. In SuSe 9.1 - KDE: System > Service Configuration > SysV-Init Editor Click on the service in the run level you want to edit. Change the sort order so it starts after any required services. Change the stop order also if shutdown order makes a difference. You will need to make the change in every runlevel you want the service to run in. Seems like I had trouble making these changes stick if I went back to yast to configure something. What I ended up doing was making a symlink with a new name. In my case, yast started smbfs at 08 (S08smbfs). In one of the kernels I boot, that postion didn't work for some reason. I changed it to S21smbfs and it work fine. Problem was any time I used yast run level editor, it set it back to S08smbfs. I finanlly made a symlink called S21my_smbfs. No problems any more. May not be the cleanest solution, but it's working so far. Good luck! Doug
The Sunday 2004-08-29 at 22:35 -0500, Doug B wrote:
Seems like I had trouble making these changes stick if I went back to yast to configure something. What I ended up doing was making a symlink with a new name. In my case, yast started smbfs at 08 (S08smbfs). In one of the kernels I boot, that postion didn't work for some reason. I changed it to S21smbfs and it work fine. Problem was any time I used yast run level editor, it set it back to S08smbfs. I finanlly made a symlink called S21my_smbfs. No problems any more.
May not be the cleanest solution, but it's working so far.
It is certainly not the suse way, yast and/or suseconfig will alter such manual links. It is documented why. Read the chapter "The SuSE boot concept" in the administration book, and the answer other people gave on this thread. -- Cheers, Carlos Robinson
On Monday 30 August 2004 07:29 am, Carlos E. R. wrote:
The Sunday 2004-08-29 at 22:35 -0500, Doug B wrote:
Seems like I had trouble making these changes stick if I went back to yast to configure something. What I ended up doing was making a symlink with a new name. In my case, yast started smbfs at 08 (S08smbfs). In one of the kernels I boot, that postion didn't work for some reason. I changed it to S21smbfs and it work fine. Problem was any time I used yast run level editor, it set it back to S08smbfs. I finanlly made a symlink called S21my_smbfs. No problems any more.
May not be the cleanest solution, but it's working so far.
It is certainly not the suse way, yast and/or suseconfig will alter such manual links. It is documented why. Read the chapter "The SuSE boot concept" in the administration book, and the answer other people gave on this thread.
Thanks for the pointer. Sometimes I find the problem with Linux is too much documentation. Often I don't even know where to start looking or how to define a search. The kernel I need to run is patched for win4lin. Neither myself or the folks at win4lin knew why smbfs wasn't setting up my etc/samba/smbfstab mounts correctly. All I figured out is I could retsart smbfs after booting and it worked. Therefore the move from the default position to the the last postion. I have no idea what really needs to go in the # Required-Start: line in smbfs script though I guess I could put what ever was loading last so smbfs would start after that. Anyway, making a link to smbfs with another name was a simple solution that I understood and that got the job done with no ill effects (that I have found so far). Thanks again for the pointer. The best threads are those that solve the problem *and* point to further documentation to help you understand why you push the butttons that were suggested to be pushed. One without the other is of some help, but both together are great! Doug
The Monday 2004-08-30 at 21:05 -0500, Doug B wrote:
It is certainly not the suse way, yast and/or suseconfig will alter such manual links. It is documented why. Read the chapter "The SuSE boot concept" in the administration book, and the answer other people gave on this thread.
Thanks for the pointer. Sometimes I find the problem with Linux is too much documentation. Often I don't even know where to start looking or how to define a search.
:-) Once I made the SuSE admin book my bedside book, around version 6.x: four or six pages were guaranteed to put me to sleep :-P Also, in older versions, susehelp could browse the manuals and a local copy of the SuSE Support DataBase (SDB) - alas, that is no longer the case -: it made easier to find some answers.
The kernel I need to run is patched for win4lin. Neither myself or the folks at win4lin knew why smbfs wasn't setting up my etc/samba/smbfstab mounts correctly. All I figured out is I could retsart smbfs after booting and it worked. Therefore the move from the default position to the the last postion. I have no idea what really needs to go in the # Required-Start: line in smbfs script though I guess I could put what ever was loading last so smbfs would start after that. Anyway, making a link to smbfs with another name was a simple solution that I understood and that got the job done with no ill effects (that I have found so far).
I think there is, or was, a token to put there that would guarantee the script to be placed at the end. I forgot which, but I think it disappeared. If you think the network must be running, select a point after the network, dns, firewall, etc, are up. For example, select mail as a required-start.
Thanks again for the pointer. The best threads are those that solve the problem *and* point to further documentation to help you understand why you push the butttons that were suggested to be pushed. One without the other is of some help, but both together are great!
This particular problem has popped up so often that I wonder why I haven't written a cooked answer to copy-paste as needed ;-) I like to mention where to find the info. -- Cheers, Carlos Robinson
participants (6)
-
Carlos E. R.
-
Chris Carlen
-
Doug B
-
Joe Morris (NTM)
-
Ken Schneider
-
Scott Leighton