|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| ARCHIVES - Programming & Scripting A place to discuss website design, programming, shell scripts, etc |
|
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I have a script that I need to have run after starting networking. I'm more used to RH and moving to SuSE and there is no rc.local file. I know there is a boot.local in /etc/rc.d, but that starts the services before any networking. any help would be appreciated.
M |
|
|||
|
Yes, this is one thing I really hate on Suse.
It really got me crazy wondering why they took it off. The conclusion I got is: Suse is X oriented, their users don't need command line, they don't want it. That's why they created tools like Yast. Very simple things are solved running Yast, they are unable to open a simple file and edit it, check the forum. The solution for your problem is very simple, do it yourself: * create your own /etc/init.d/rc.local as root (you know how, right?) * write whatever you need on it, but place a preamble at the very beginning: #!/bin/sh ### BEGIN INIT INFO # Provides: rc.local # Required-Start: $network $syslog # Required-Stop: $network $syslog # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Description: whatever ### END INIT INFO * then chmod 755 rc.local * and finally chkconfig --add rc.local That's it |
|
|||
|
Quote:
|
|
|||
|
Of course you can change the files that you need, it would be ridiculous if not.
What I mean is about the Suse philosophy behind configuration. Everything should be X oriented through whatever tool, they almost do not document the way via command line, simply because they think users don't want to handle command line. This is Windows philosophy and Suse follows that. I don't think this is wrong, IMHO I think this is necessary for the good sake of Linux -- perhaps the single change against Bill Gates. Unfortunately, sometimes is pretty easy to do things via command line and get very annoying when they changed that in order do provide an X solution. Don't mind, I'm just a 28 years old Linux user since Red Hat 5. I wander I may be too old now... |
|
|||
|
What you need is /etc/init.d/boot.local. This is the SuSE equivalent of rc.local. See the comments in that file.
|
|
|||
|
Wrong, boot.local is not equivalent to rc.local because this file is the last thing being executed on the boot process, so there is no equivalence in Suse.
Read the first post to get more details. |
|
|||
|
As you can read here boot.local is execute before network (runlevel 3,5)
Quote:
|
|
|||
|
Yes, exactly what I'm saying
* boot.local is executed before network * rc.local is executed as the last thing on the boot sequence The question is: what is equivalent to rc.local on Suse? I guess nothing. |
|
|||
|
Quote:
13.4.1. To create a custom init script for a given program or service, use the file /etc/init.d/skeleton as a template. Save a copy of this file under the new name and edit the relevant program and file names, paths, and other details as needed. You may also need to enhance the script with your own parts, so the correct actions are triggered by the init procedure. The INIT INFO block at the top is a required part of the script and should be edited: Example13.1.A Minimal INIT INFO Block ### BEGIN INIT INFO # Provides: FOO # Required-Start: $syslog $remote_fs # Required-Stop: $syslog $remote_fs # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Description: Start FOO to allow XY and provide YZ ### END INIT INFO In the first line of the INFO block, after Provides:, specify the name of the program or service controlled by this init script. In the Required-Start: and Required-Stop: lines, specify all services that need to be started or stopped, respectively, before the service itself is started or stopped. This information is used later to generate the numbering of script names, as found in the runlevel directories. Under Default-Start: and Default-Stop:, specify the runlevels in which the service should automatically be started or stopped. Finally, under Description:, provide a short description of the service in question. To create the links from /etc/init.d/ to the corresponding runlevel directories (/etc/init.d/rc?.d/), enter the command insserv <new-script-name>. The insserv program evaluates the INIT INFO header to create the necessary links for start and stop scripts in the runlevel directories (/etc/init.d/rc?.d/). The program also takes care of the correct start and stop order for each runlevel by including the necessary numbers in the names of these links. If you prefer a graphical tool to create such links, use the runlevel editor provided by YaST, as described in Section 13.5. ?The YaST Runlevel Editor?. |
|
|||
|
Quote:
I was trying to get dynubasic to run without being put into .xinitrc. This works but it doesn't make sense to run X just to run a dynamic IP client (dynu.com)!I'm running 10.2 and I'd like to note that in the man page of insserv it says .local file names are not acceptable now (among other names). So I renamed my rc.local to rclocal. Otherwise chkconfig gives you an error. I did use the skeleton (/etc/init.d/skeleton) file as my starting point. |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|