Hi,
LS1021A
I want to implement a script in the init.d since my distro has a poky-tiny version so there is no systemd, I want to add a script so that my system boots up it will run that script. Where should I save such a script under my build directory?
I am using busybox, should I add it into inittab please help.
C is not a scripting language. You cannot run a C code directly from a SysV
startup script. If you are using Yocto, create a valid recipe to build your
program and install it, then the binary can be invoked from a startup
script.
Have a great day,
Platon
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi bpe,
I did add
but after I did this and install the myscript to (this is my busybox recipe file name: busybox.bbapend
Below is the link to an article that discusses possible ways to run a script
on each boot:
https://www.linux.com/training-tutorials/managing-linux-daemons-init-scripts/
As of the location of the script in your build directory, it can be anywhere,
important only is where your recipe do_install puts it on the target.
Have a great day,
Platon
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi bpe,
Thanks for the reply, what if the file I want to call from init.d is a C file
I can't just put in the start)
section that
start)
gcc /home/myscrpt.c -o exe
/home/exe
(1)should i still do this in the build ?
(2) also can I do cp myscrpt /usr/bin as well?