Hello, I want to start my application at boot by using /etc/init.d/Startlegato.sh.
The problem is that only my application doesn’t start at boot.
(=In the following case, test.txt is generated, but my application doesn’t start.)
・The application is called from the shell scrypt I made for the test.(test.sh)
・I set command “/etc/init.d/test.sh” to /etc/init.d/Startlegato.sh.
・test.sh includes other command like “touch /home/root/test.txt”
I prepared the application by the following steps:
・ Bulid the application with VM on windows PC
(VM:Orange - mangOH Dev using Legato 18.09.0 on Ubuntu 18.04)
・ Copy it to /home/root on WP8548 by SSH.
・ Grant an authority (666) to the application.
After the preparation above, I checked the application can be started by inputting the command “/home/root/[app name]” or /etc/init.d/test.sh on legato.
@jyijyi
Sorry for the late reply, and Thank you for your information.
I use startlegato.sh on WP8548 like the following.
“touch in test.sh” works, but my application “/home/root/ctrl_gpio” doesn’t work.
I want to start ctrl_gpio by using startlegato.sh at boot.
(ctrl_gpio simply changes the value of a particular GPIO pin. )
If you have any ideas, Could you give any advice?
--startlegato.sh---
LEGATO_START=/mnt/legato/start
case "$1" in
start)
echo "Legato start sequence"
$LEGATO_START
etc/init.d/test.sh
--test.sh---
/home/root/ctrl_gpio 33 1 100 &
touch /home/root/test_.txt
Thank you for your additional information.
I understand that you mean I must consider the time for creating a path to the app.
I tried it but only my app still doesn’t start.
Are there any point I have to check?
Authority for the app or making symbolic link to a particular directory?
-Otherwise, I misunderstand how to build the app?
But, the application starts by using command after logging in to legato.
So, I wonder why the app doesn’t start when I use startlegato.sh.
how about building an unsandboxed helloworld legato application and inside calling your application ctrl_gpio by system("/home/root/ctrl_gpio 33 1 100 \n"); ?
Actually, I use shared shared object (/home/root/lib.so) built on mangoh VM.
I also grant an authority (777) to the application and I can call ctrl_gpio by command on legato.
So, I think the cause of this trouble happens when I use lib.so and startlegato.sh.
Are there any rules that I should use for using a shared object in this case?
Sorry, I misunderstood your advice.
Actually, I am not familiar with unsandboxed legato application, but I will look for how to build as unsandboxed legato application and try it!