Skipping bash login

Started by normad, October 06, 2012, 06:00:20 AM

Previous topic - Next topic

normad

hey guys im using the Olinuxino board for an embedded application. I have two compiled programs which are executed in order through a shell script. but everytime the board is reset i have to manually login before executing the shell script. Is there any way i can execute this script automatically on startup without having to manually login? because it is  impractical to connect the uart evertime on power up to login.
thanks in advance

jeroends

simply make a startup script for your app's, you can find one in the package of my modi2c: http://leachy.homeip.net/olinuxino/files/modi2c.tgz. It's not the best script but it will get you started. Change the script to your needs and place it in /etc/init.d/ .

flavigny

#2
Hello here is how I pass this step.

I use an Sdcard published by octavio (http://download.ossystems.com.br/images/imx233-olinuxino/ )

the sandbox is the folder /etc/init.d; it contains the tasks executed while boot, before login.

1) I put my script in /etc/init.d folder, eg:  myjob

2) in the folder /etc/rc5.d we have a lot of links. This folder is used when switching "run level" 5. Those with initial letter "S" will be run at START-TIME. so I add a symbolic link named "S55mytask" targetting my new script in /etc/init.d:
ln -s ../init.d/myjob S55mytask

as example, on the original SdCard from Olimex, watch:  rc5.d/S99led_blinking linking to: /home/root/test/led_blink &

regards.
PO.

Kean

Depends which Linux distribution you are running, whether or not you will have initscripts functionality.

I normally just add a couple of lines to /etc/rc.local like:
cd /application/folder
nohup ./appname &


Kean

normad

ok thanks a lot guys :) im using arch linux.