setting the processes to run on startup
hi everybody,
i have this small script for a backup software.. and there is a hint to make links like this.. i am using suse 10.2 and i don't have the directories rc0.d or rc1.d in /etc/init.d. I only have them as files.. can someone help how to deal with it? how can i create links.. another question is, in general, how can i place a process on linux-startup so that i runs after each restart? thnaks.. |
I don't use SUSE, but you might try their forum...
http://forums.suselinuxsupport.de/in...howtopic=52444 |
in redhat and fedora, you can put the script command in /etc/rc.local file
each and every restart this file gets executed |
The links you provided are both unreachable (403 Forbidden), but in general, scripts to be executed at boot time are in /etc/init.d/ and symbolic links in /etc/rc3.d (for runlevel 3) or /etc/rc5.d (for runlevel 5). The links have a name that starts with "Snn" where the number indicates de order of execution relative to others in the same folder. There are links starting with "Knn" to stops the service in a particular order too.
For example, my e-mail server is Postfix and it is started in runlevel 5. Code:
[root@agente86 ~]# ls -l /etc/init.d/postfix /etc/rc5.d/S80postfix If it is a simple script that does not expect a start/stop argument, or just a command, edit the file /etc/init.d/boot.local and add the command at end of this file. |
thanks for your reply..
i have done what you have said..here is a terminal log which shows the actual state. Code:
mfc-falter:~ # cd /etc/init.d/ but after restart, there is no dsmc process which should be run by the adsm script. i can start and stop manually but not on startup. any ideas? adsm is already wrx for root. thanks.. |
Quote:
I think this is because there is no file "/etc/rc5.d/S80adsm" where "S" means "start". You show us only the "K21adsm" file which will kill the process in that run-level. Test if your adsm script is LSB compliant by running "chkconfig --list". If you get a output that shows in what levels it is on and what levels it is off, then you don't need to create the links by your self. Use chkconfig interface to do that: "chkconfig adsm off" (to remove all links you eventually have created) followed by "chkconfig adsm on" and another "chkconfig --list" to see in what levels it will be run. If it not follows the "chkconfig" interface, remove all K21adsm links and create the "Snnadsm" links in runlevel 3 and 5. You need to carefully choose the right "nn" in a way the script will run only after the services it depends on are already started. |
I Went To Customer To Install Linux In New System But It Is Not Installing At Last I Had Found That The Harddesk Is With Sata Cable.
Why Sata Hdd Not Support To Lunix Then How To Install This While Installing The System Does Not Find Any Hdd Please Help Me What To Do |
Quote:
|
thanks marozsas,
yes i was meaning a system boot (reset) i have done everything as you said, i ran chkconfig --list, level 3 and 5 were on. with chkconfig adsm on/off i set the level on and off. now here is a directory overview Code:
mfc-falter:/etc/init.d/rc3.d # ls -l *adsm* i will post the results when i can make the reboot but i think it should work out.. can you explain me the magic behind the curtain? what does LSB mean? what are all those levels? S is start, K is kill..what other things more? |
Quote:
For instance, an init script that follows this conventions have a small header that is used by chkconfig and fellows, to deal with the links in /etc/rc.d and runlevels. Postfix has the following header and as you can see, the information bellow informs the proper order and pre-requisites to this script. Code:
# And no, there is no other link type than the ones that start with "S" or "K". Another convenience on SuSe are the rccommands - they are easy to type and to autocomplete by your shell: In Suse, almost every init script can be start/stopped with the rccommands, i.e. rcpostfix start (or stop - there is also status and restart - in fact, is just a link from /sbin/rcpostfix to /etc/init.d/postfix - you can make the link yourself for adsm...) In Redhat/Fedora, you can do the same with "service postfix start". (I don't know if the above is under LSB conventions or not) cheers, |
i am sorry to say that but it did not work out..
it does not start after reboot.. i had to start it manually.. any further ideas? |
Please, give us the output of the following commands:
Code:
# runlevel |
before giving the outputs a quick question...
xinitrc file for the GUI responsible.. i mean the programs that i run via xinitrc file will be loaded only after i start KDE or GNOME..is this right? |
Code:
mfc-falter:~ # runlevel Code:
mfc-falter:/etc/X11/xinit # ls -l xinitrc Code:
# |
Quote:
|
All times are GMT -5. The time now is 05:19 PM. |