I've been though several threads on this forum trying to find a definitive up
to-date way of launching a program as root after Linux has finsihed booting
without logging in. In my case my program (in /home/root) is a long'ish
shell script which initializes WiFi using wpa_supplicant.conf, outputs a
splash screen to an SPI OLED display, reads some GPIO buttons, calls
media-ctl and yavta, and then calls some other code I've written to analyze
the grabbed image. I want to use my Yocto rootfs 3.5 kernel Gumstix-based
system as a headless device without (ideally) a serial port root console
permanently attached to it.
I've tried adding an executable script to my /etc/init.d/ directory along
the lines of:
and then putting a symlink to this in /etc/rc5.d/
However, this only seems to partially work as I can see the WiFi
initialization being called (it looks as if it is happening before the
libertas_sdio driver finishes loading) and then I get no other output
despite having numerous echo calls in my script. I did try 'update-rc.d
myscript defaults' and that seems to create a low-numbered (i.e.
S20myscript) symlink in almost all of the rc?.d directories which is not
what I want as I just want the script to run after everything has finished
loading so I only need a one call in rc5.d.
I'm trying to figure out if the SysV init approach is the right/best route
or whether I should be looking at systemd instead which the rootfs calls at
startup. If systemd is the way to go, then exactly what do I need to do to
implement a solution that way? If SysV is ok, then does the script need to
have start/stop/restart functions?
I also came across a thread about AutoLogin but that referred to
/etc/inittab and /etc/rc.local neither of which appear to be in my /etc
View this message in context: http://gumstix.8.x6.nabble.com/Overo-Yocto-running-a-program-automatically-after-Linux-has-finished-booting-tp4968205.html
Sent from the Gumstix mailing list archive at Nabble.com.
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
gumstix-users mailing list