ts-7000
[Top] [All Lists]

Re: [ts-7000] Re: How to start application at boot time on TS-7260

To:
Subject: Re: [ts-7000] Re: How to start application at boot time on TS-7260
From: william inocencio <>
Date: Thu, 3 Apr 2008 23:14:55 -0300 (ART)
see .........



You can use update-rc.d for start-only or stop-only scripts
Start my script on startup :
# update-rc.d -f my_script start 99 2 3 4 5 .
where
- start is the argument given to the script (start, stop).
- 99 is the start order of the script (1 = first one, 99= last one)
- 2 3 4 5 are the runlevels to start
Dont forget the dot at the end
More info in /etc/rcS.d/README
Start my_script on shutdown and reboot :
# update-rc.d -f my_script start 90 0 6 .
Stop my_script on halt and reboot :
# update-rc.d -f my_script reboot 90 0 6 .
If you want to make your own demon, you can use the skeleton file provided at
/etc/init.d/skeleton
about runlevels :
To know which runlevel you are running, simply type
$ runlevel
more info about runlevels here : http://oldfield.wattle.id.au/luv/boot.html#init
happy scripting
hugs...........William


alexanchoragealaska <> escreveu:
Well, as I mentioned in previous e-mail: "I don't have much experience
with scripts" :). Turns out that I had couple errors in the script
(missing after start and stop). Everything is working OK now.
Jim and Triffid, thanks for help.

- Alex

--- In .com, "alexanchoragealaska" <> wrote:
>
> Based on suggestions from Triffid Hunter and Jim Jackson I used ln()
> to create a symbolic link for my script.
>
> The script is below:
>
> #! bin/sh
>
> case $1 in
> start)
> mount -t nfs /ipaddress:/pub /mountpoint
> cd /mydirectory
> ./MyApplication
> stop)
>
> esac
>
> The script is located in /init.d directory.
>
> I ceated the symbolic link to the script in rc3.d directory:
>
> cd /etc/rc.d/rc3.d
> ln -s ../init.d/MyApplication S99MyApplication
>
> No errors. I restarted the TS-7260, but nothing happened: the network
> drive is not mounted and my application is not running.
>
> Is there any way to check where the problem is? I don't have much
> experience with scripts, but I am guessing there is some way to debug
> script and to check if the script is executed without errors?
>
> > Hi,
> >
> > I am running TS-Linux on TS-7260. I wrote an application that
> > calculated some data and stores it to the network drive. The
> > application works fine from command line. What I am trying to do is
> > to make application start automatically at boot time. Since I need to
> > store the data at network drive, I also need to mount network drive at
> > boot time. I did some search and it sounds like the best option is to
> > create a script in etc/init.d directory.
> >
> > Now I need to "update symbolic links" by update-rc.d
>
> > I am getting error message:
> > -sh: update-rc.d: not found
> >
> > Does TS-Linux have update-rc.d? If not, how can I "activate" the
script?
>
> symlink from /etc/rc2.d (might be /etc/rc.d/rc2.d) and/or rc3.d,
call it
> S99scriptname (S means start, 99 is the order. see other symlinks in
the
> same dir for examples)
>
> --- In .com, Jim Jackson <jj@> wrote:
> >
> >
> >
> >
> > On Wed, 2 Apr 2008, alexanchoragealaska wrote:
> >
> > > I tried to open several S##scriptname scripts in rc3.d (using vi
> > > editor), but these files look empty. I guess it would make sense
> > > considering that this is "symbolic link". So, my understanding is
> > > that I need to run symlink() command to create these S##... files?
> > > Can you provide an example of symlink command?
> >
> > man ln
> >
> > on any linux system with man pages.
> >
> > Or one the web a search for linux man ln came up with thousands of
> pages,
> > this being typical...
> >
> > http://linux.die.net/man/1/ln
> >
>



Abra sua conta no Yahoo! Mail, o único sem limite de espaço para armazenamento! __._,_.___

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU