ts-7000
[Top] [All Lists]

[ts-7000] Re: execute an embedded program at startup (newbie)

To:
Subject: [ts-7000] Re: execute an embedded program at startup (newbie)
From: Mike Dodd <>
Date: Mon, 05 Dec 2011 20:23:25 -0500
kristeenpalmer wrote:
> hi, i have a newbie question. how can i configure TS-Linux (7200) to
> skip all the console output, login, etc. and run my embedded
> application on startup? thanks, kris

When Linux boots, you'll get a login prompt. You don't need to "skip" it 
-- just ignore the login prompt or unplug the console terminal.

Put your program somewhere (e.g.,/root/programs.d or /usr/bin) and give 
it Execute permissions: chmod 755 my_program.

Write a simple shell script in /etc/init.d to start your program. Name 
it something like my_program_run:

----------
#! /bin/sh
#
# Name: etc/init.d/my_program_run
#
# Starts the program and leaves it running in the
# background.

echo -n "Starting my program..."
/root/programs.d/my_program &  # Note the trailing &
----------

Give the script execute permission:
   chmod 755 /etc/init.d/my_program_run

Make a symlink to this script in /etc/rc.d/rc3.d:
   ln -s /etc/init.d/my_program_run /etc/rc.d/rc3.d/S60my_program

Test to see if the script runs:
etc/init.d/my_program_run
ps aux

Does your program show up in the list of running processes? To stop it: 
killall my_program.

Reboot (shutdown -r now). Then login to see if your program is running 
(or watch the LEDs if your program manipulates them.

HTH.
-- 
Mike

Mike Dodd
Louisa County, VA USA

http://mdodd.com


------------------------------------

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/

<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