ts-7000
[Top] [All Lists]

RE: [ts-7000] [ts-7500] beginner question: boot script in /etc/init.d an

To: <>
Subject: RE: [ts-7000] [ts-7500] beginner question: boot script in /etc/init.d and /etc/rc2.d
From: "Jongsoo Kim" <>
Date: Mon, 10 May 2010 22:45:48 -0400


Thanks Neil

I tried but no luck…

 

One thing I noticed is other programs under rc2.d are shown when I type “ps -ef”

But my two programs are not showing.

 

When initial booting, it prints out "Starting script acu_servers " and all other print message from my program.

And then “login:” prompts.

 

But my programs are not running.

 

To me, the run-level script is for idle programs.  But my programs need to run all the time…

 

 

 

 

Jongsoo

 

 

From: [ On Behalf Of Neil Stone
Sent: Monday, May 10, 2010 10:13 PM
To:
Subject: RE: [ts-7000] [ts-7500] beginner question: boot script in /etc/init.d and /etc/rc2.d

 

 

Looks to me like your if statement is borked, but thats just my opinion..

Try;

if [ -f /var/lock/acu_servers ] ; then
exit 1
else
echo "Starting script acu_servers "
cd /home/eclipse
/home/eclipse/acu_server &
/home/eclipse/acu_rt_server &
touch /var/lock/acu_servers
fi

Hth..

Neil Stone

-----Original Message-----
From: Jongsoo Kim <jongsoo.kim%40azultd.com>
Sent: 10 May 2010 22:47
To: ts-7000%40yahoogroups.com
Subject: [ts-7000] [ts-7500] beginner question: boot script in /etc/init.d and /etc/rc2.d

Dear group

I realized I am a very beginner to Linux ( I thought I knew OK).

We wrote two programs "acu_server" and "acu_rt_server" and I am trying to
make these program start when TS7500 boots. I saved the binary files of
"acu_server" and "acu_rt_server" under /home/eclipse ( I just decided to
use eclipse directory just for convenience since I am using eclipse)

After some study of Debian, a simple following script called "acu_servers"
was written and copied into /etc/init.d directory and then "update-rc.d
acu_servers defaults" was issued.

The problems is during boot, I see the correct boot output message shows up

But if I do "ps -v", my two programs are not running.

As usual, I greatly appreciate if someone can kindly advise me.

#! /bin/sh

### BEGIN INIT INFO

# Provides: acu_servers

# Required-Start: $remote_fs $syslog

# Required-Stop: $remote_fs $syslog

# Default-Start: 2 3 4 5

# Default-Stop: 0 1 6

# Short-Description: Start acu_server and acu_rt_server

### END INIT INFO

PATH=/sbin:/usr/sbin:/bin:/usr/bin

case "$1" in

start)

if test -f /var/lock/acu_servers; then

exit 1

fi

echo "Starting script acu_servers "

cd /home/eclipse

/home/eclipse/acu_server &

/home/eclipse/acu_rt_server &

touch /var/lock/acu_servers

;;

stop)

echo "Stopping script acu_servers"

killall acu_server acu_rt_server

rm -f /var/lock/acu_servers

;;

*)

echo "Usage: /etc/init.d/acu_servers {start|stop}"

exit 1

;;

esac

exit 0

Thanks

Jongsoo Kim



__._,_.___


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