I'm working on an embedded linux based on yocto. The system is mounted as read only, and I want to manage applications installed by opkg in a data partition with systemd.
In order to do that, I've created a target, changed the default.target link to point on my own target. That is working, and I can run services installed in the /etc/systemd/system/ folder.
The next step is to run services installed in a folder with a path like /data/etc/systemd/system/.
I've found, in the systemd documentation, the possibility to set the SYSTEMD_UNIT_PATH variable to extend the folders where systemd is looking for services. But after many tests I've not found the way to set properly this variable and systemd never find my service.
Can you help me to resolve this issue ?
Edit : If you have a way to do that without adding it to the kernel command line, that will be perfect.