LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-28-2012, 10:01 AM   #1
olegmsg
LQ Newbie
 
Registered: Jan 2012
Posts: 2

Rep: Reputation: Disabled
Embedded Linux. Automatically start application after boot. Quit by Control-C.


I built Linux very basic rootfs with minimum set of directories and BusyBox inclusive. There are
/etc/init.d/rcS
#!/bin/sh
mount -t proc none /proc
mount -t sysfs none /sys

/etc/inittab
#my_inittab configuration.
::sysinit:/etc/init.d/rcS
ttyS0::respawn:/bin/sh

/etc/fstab
#my_fstab configuration.
proc /proc proc defaults 0 0

/bin/sh
/bin/my_hello
/bin/...

I can run my_hello from BusyBox shell. I can quit my_hello and get back to BusyBox shell by pressing Control-C.
I want to automatically start my_hello after Linux boot and quit my_hello and get into BusyBox shell by pressing Control-C. Is it possible to do it with rcS and inittab only?

Last edited by olegmsg; 01-28-2012 at 12:40 PM.
 
Old 01-28-2012, 12:12 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 7,921

Rep: Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776
In that case, you don't need consoles? Have you /etc/inittab? why not put something like

respawn <runlevels> /path/to/my_hello
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
start application automatically after login gcomandini Linux - Newbie 4 02-06-2008 02:33 AM
automatically start application guy_ripper Linux - Software 2 01-07-2007 07:54 AM
ath0 does not start automatically at boot angryfirelord Fedora 3 11-05-2006 12:37 PM
Mandrake Control Centre tries to start automatically everytime I login pwilkie Mandriva 3 02-27-2005 02:26 AM
How do I start programs automatically with boot up? Kasperisa Linux - Newbie 6 07-15-2004 03:29 PM


All times are GMT -5. The time now is 08:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration