iools, thanks
Im using debian lenny with an AMD Geode lx800 processor ,
is possible run my script after 3 minutes that the complete system is loaded??
cheers,
Main Topics
Browse All TopicsDear Experts,
I have a Script in order to run 2 applications, one is in order to have communication with a gsm modem, the other is to have control for an equipment.
I want to start my script before the all other programs or in the end of all programs, because I need have a serial communication and have an information obtained by the equipment but is necessary start (or in the end) more slowly to have the correct answer
what can I do?
cheers,
my script is:
#!/bin/sh
start() {
/home/ipn/datalogger/extra
/home/ipn/datalogger/trans
}
stop() {
echo -n "stoping services..."
/sbin/ifdown -a
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Init will start the scripts in order, and doesn't itself have a facility to delay by an amount of time. But you can put a sleep command in the final script so it waits 3 minutes before doing anything, if you think that's really necessary.
You might want to arrange that a console is enabled for login before this sleep.
You could be better off having the early script (that does the setting up) create a file when setup is complete and the final script wait for that file to appear (in a small sleep loop say). Guessing some amount of time to wait is always a bit hit and miss.
Thanks
Now I have my lines
home/ipn/datalogger/extrac
/home/ipn/datalogger/trans
in the start section in rc.local script but it not work ..my lines not are loaded
I think that is necessary have the script in the end when the system is loaded in other case the communication with my data logger is incomplete (I have files with not completed information).
in the sleep command my serial ports works? or all the system is affected ?
thanks ..
Business Accounts
Answer for Membership
by: joolsPosted on 2008-10-11 at 10:47:09ID: 22694723
What distro are you using?
Redhat can be configured by adding it so chkconfig controls it; you can put the following like in your script;
# chkconfig: 2345 10 90
This tells it to be run in levels 2,3,4&5, start is 10, end is 90.
Or you can do it manually by copying it to the run level you want it to start at and naming it something like;
/etc/rc2.d/S15myscript
More detail can be given if you let us know your distro.