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 Jim Jackson <> 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
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|