Hello,
I’m creating an OpenSuse based embedded system that mostly consists of a Qt/Embedded application – since it should function as an appliance, I want to have it boot, then immediately start that application without user intervention.
The only way I’m aware of of doing this with OpenSuse is to create a custom init script. I have done so, using /etc/init.d/skelton as a basis. It pretty much just consist of an INIT INFO section, followed by an invokation of another bash script only when the init script is called with the “start” argument.
The Qt/E program is run from this other bash script (started from the init script), which runs it in an infinite loop. This is so that my application can be restarted – if the application creates a “restart” file in /tmp/, which the script checks for the presence of, we know to go through another iteration of the loop when the program ends - otherwise we break out of the loop, because it was intended for us to finish the program.
All of this is not ideal for two reasons:
1.It causes the init script to never return, so the system is never properly initialised. Thus, we don’t have any spare gettys to work with if we need to.
2.I cannot get my services to start after all other services. I have specified that $ALL services are required to be started before my service, and this worked for a while, but no longer does. I’m not sure what I might have done to stop it from working, or if the fact that my service started after others for a time was a fluke. I initialised my service with “chkconfig --add my_service”.
Now, my service starts somewhere in the middle of other services, which is unacceptable – it stops important services like smartd from starting, or it cannot start because it itself is directly dependent on other uninitialised services.
Could someone either :
a. suggest an alternative approach that has the desired effect of invoking my application after all system services have been started.
or
b. suggest a way of adopting my current basic approach so that at least my application is started last as a service – that wouldn’t get me back my gettys, but it’s something I could live with.
Any help is greatly appreciated,
Regards,
Sternocera