ts-7000
[Top] [All Lists]

Re: [ts-7000] Re: ts-7000 in unattended embedded service

To:
Subject: Re: [ts-7000] Re: ts-7000 in unattended embedded service
From: Andy Warner <>
Date: Wed, 17 Aug 2005 10:42:50 -0500
jenlhunt2003 wrote:
> Actually, putting
> 
> tst1:12345:wait:/mydir/myprogram
> 
> after the Run Level r6:6:wait:/etc/rc.d/rcS 6 line in etc/inittab
> seems to work quite well so far, including network connectivity.
> 
> So, since this approach isn't proper, how do you recommend handling
> unattended bootup the "right" way?  Seriously, not being able to boot

Why isn't using inittab the "right" way ? init's only job is to
run programs in an orderly manner. It's responsible for running
getty so you can get a login prompt. Indirectly it's responsible
for sshd/telnetd access too.

Init deploys 2 mechanisms to run programs:

/etc/inittab entries

/etc/rc.d scripts

placing a script (or a link to a script) in /etc/rc.d/rc<n>.d/
will also ensure it is run with specific arguments (start|stop)
when the system enters/leaves a given runlevel (it's slightly
smarter than that - but that's the summary).

You can use either method to get init to run your
program, historically scripts are used to start
daemons (inetd, lpd etc) and run complex config
scripts (e.g. network config) - whereas inittab
is used to run straightforward programs that need
to be restarted (e.g. getty, X server etc)

The specification you list will happily run myprogram in
runlevels 1, 2, 3, 4 & 5 - which might not be what you want.
You may only want to run it in 345 or even just 5. 1 & 2
are before the system has gone multi-user and got the network
up and running.

Here is the secret decoder ring for the runlevels (not
that secret, it's in a comment at the top of most inittabs):

#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)

You can also specify "respawn" instead of "wait" and init
will restart the program whenever it exits instead of just
running it once. Be warned that it will throttle how many
times per second it runs the program - it does not expect
the program to exit quickly.

Ultimately, however you run the program, it can be traced
back to init and /etc/initab or /etc/rc.d/* on most unmodified
linux systems - I don't see mastering init as too much hassle.
"man init" and "man inittab" are your friend.
-- 


Andy Warner             Voice: (612) 801-8549   Fax: (208) 575-5634


------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12h7u4ffc/M=362329.6886308.7839368.1510227/D=groups/S=1705005378:TM/Y=YAHOO/EXP=1124300580/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> 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