Hello!

I have a recipe that can be installed into image using postinstall RPM scriptlet only.
It's an archive wrapped with a shell script.
During the do_rootfs step this RPM is installed such a way: executional archive placed into /opt/.
Then during the first system load systemd runs it's postinstall scriptlet

scriptlet is simple:

/opt/my_server.bin.sh
systemctl enable my_server.service
systemctl daemon-reload
systemctl start my_server.service

In my system when systemd runs this postinstall scriptlet it's executed, system is loaded, service is enabled, but not started.
service state is "enabled, but inactive (died)"
During the postinstall scriptlet execution at systemd first load I see message that my service is stopping instead of starting.
After reboot my_server.service is enabled and started.

Looks like systemd doesn't want to start service or it stopping it immediately after postinstall.
What can I do to start it on first load after postinstall ?

my_service.service have such a settings:

[Unit]
Description=my_server
After=syslog.target

[Service]
Type=simple
Restart=on-failure

Thanks!
--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to