LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to run an application after the boot ? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-run-an-application-after-the-boot-4175539322/)

wowy 04-10-2015 10:01 AM

How to run an application after the boot ?
 
Hi, i know this could seems like a "simple" question but after a lot fo try i can't seems to make it works, i am stuck on this. I am working on a sbc6000x board, linux 2.6.24, an embedded system.

I am working on a pretty nice project which when called like this run perfectly :
Code:

cd /bin
./apps

(/bin/apps don't works, it must be ./apps from the directory)

After searching a little about the startup i learned about rc.local and created it in /etc/init.d, rc.local look like this :

Code:

#!bin/sh
# /etc/rc.d/rc.local: Local system initialization script.
#

cd /bin
./apps
cd

Sadly it seems it is never called. I was thinking about maybe add cd /bin, /.apps to the end of the etc/profile but i don't know if profile can run command aside from simple scripts call.

Does anyone has an idea on why this don't work or on how i could do this ?

suicidaleggroll 04-10-2015 10:04 AM

The first question is why doesn't "/bin/apps" work? What happens? Is there an error?

What is this "apps" program? Does it run forever? Does it return? Does the exit status mean anything or do you care?

When you put it in rc.local, how do you know it's never called? Does your rc.local file have execute permissions? Do you see any errors/warnings in the system logs?

wowy 04-10-2015 10:09 AM

Quote:

Originally Posted by suicidaleggroll (Post 5345446)
The first question is why doesn't "/bin/apps" work? What happens? Is there an error?

What is this "apps" program? Does it run forever? Does it return? Does the exit status mean anything or do you care?

When you put it in rc.local, how do you know it's never called? Does your rc.local file have execute permissions? Do you see any errors/warnings in the system logs?

When using "/bin/apps" i get a "error while loading shared libraries : libstcd++.so.6: cannot open shared object file: No such file or directory". Running it with ./apps generate no error and run.

This apps read an .ini file on a sd card, configure the board with the data from the sd card and then call another program before closing (which works with no issue with ./apps).

I chmod 777 rc.local in order to give it all rights (this is only for a test, later i will restrict it maybe).

Nothing happen, no error message. Maybe rc.local is called but it it doing nothing.

veerain 04-10-2015 09:46 PM

Try running 'ldd /bin/apps'. See if it requires libstcd++.so.6. If so whether it is available.

Else would have to install C++ runtime package available with gcc/g++/libstdc++ pacakage.


All times are GMT -5. The time now is 06:05 AM.