LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-31-2011, 12:55 PM   #1
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 229

Rep: Reputation: 20
Create Startup Script in Angstrom


I'm looking to run a program automatically on boot (but before login). I was think to add this to rc.local but it would appear that this file doesn't exist in Angstrom. Where should I put my script?
 
Old 04-14-2011, 11:43 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Create a startup script in /etc/init.d/ like the other services?


//NTLB
 
Old 04-14-2011, 01:16 PM   #3
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 229

Original Poster
Rep: Reputation: 20
Thanks.... I forgot about this thread, figured it out a little while ago. I took me a little bit to figure out how the numbering in file names was related to it, but I got it.
 
Old 04-21-2011, 11:00 PM   #4
fmbnc
LQ Newbie
 
Registered: Apr 2011
Posts: 1

Rep: Reputation: 0
How did you end up getting it working? I haven't been able to figure out the numbering.
 
Old 04-22-2011, 06:39 AM   #5
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 229

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by fmbnc View Post
How did you end up getting it working? I haven't been able to figure out the numbering.
I currently do not have possession of the Pandaboard (as it was a group projeect and the project is finished) but I sent an email to my friend, asking him to hook it up to the internet so I can ssh to it and figure out how I did it. I will get back to you on this.
 
Old 01-27-2012, 11:59 AM   #6
matschr
LQ Newbie
 
Registered: Nov 2010
Posts: 6

Rep: Reputation: 0
Place a link in /etc/rc5.d with a name starting with an "S", followed by a number between 1 and 99 followed by arbitrary text. By convention it would link to a script in /etc/init.d which would do the work. BTW, I'm looking for a way to run an application at init which has access to the keyboard for reading. If anyone knows how to make that happen, I'd be happy yo hear.

- Matthew
 
Old 01-27-2012, 11:13 PM   #7
Nominal Animal
Senior Member
 
Registered: Dec 2010
Location: Finland
Distribution: Xubuntu, CentOS, LFS
Posts: 1,723
Blog Entries: 3

Rep: Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948
Quote:
Originally Posted by matschr View Post
BTW, I'm looking for a way to run an application at init which has access to the keyboard for reading.
I guess the best option is to tell a getty to run your application instead of /bin/login.

If you have file /etc/init/tty1.conf containing
Code:
exec /sbin/getty -8 38400 tty1
then replace the line with
Code:
exec /sbin/getty -i -l yourprogram -n -8 38400 tty1
and instead of the normal login prompt in the first console, yourprogram will be executed (with root rights). (If you don't want it in the default first console, just modify one of the other gettys.)

Remember that this occurs very early in the boot. If you use a language like C++ which relies on dynamic libraries or runtime residing under /usr, it is better if you use a trampoline script, something like
Code:
#!/bin/dash
while [ ! -d /usr/lib ]; do sleep 1 ; done
exec your-actual-application "$@"
saved in /bin/, to make sure the mount points are available before your program proper is started.
 
  


Reply



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
how to create startup script? samengr Linux - General 7 04-15-2008 08:44 AM
Create new script that runs on startup pnellesen SUSE / openSUSE 1 01-23-2007 08:29 PM
How to create a Linux Startup script?? Cypher12 Linux - Networking 1 12-18-2006 02:16 PM
How Do I Create A Startup Script? joany MEPIS 21 11-30-2006 04:43 PM
newbie - how to create a startup script gogogadgetearl Linux - Software 2 10-02-2005 08:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:57 AM.

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
Open Source Consulting | Domain Registration