Hi Jupiter,
/etc/profile and similar are interactive shell (/bash) concepts, not really system startup ones. So indeed: just on a login (be it local, ssh and so on) they are executed.

If you want to execute something else without the need for logging it, you should look elsewhere, depending on your system manager: if systemd you should create a service and enable it, if sysvinit a init.d script.

HTH,
Federico


Il giorno lun 11 ott 2021 alle ore 06:30 JH <jupiter.hce@gmail.com> ha scritto:
Hi,

The Yocto uses /etc/profile for root login, but there is no root
physical login in an embedded device so the /etc/profile is never
called, I added a shell script to /etc/profile.d, it was not called
either. Both /etc/profile and scripts in /etc/profile.d can only be
invoked when I physically log into the debug console, that is
impractical. Appreciate your advice, how do you resolve that kind of
problem?

Thank you.

Kind regards,

- jupiter

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156808): https://lists.openembedded.org/g/openembedded-core/message/156808
Mute This Topic: https://lists.openembedded.org/mt/86229953/5117409
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [fede@evolware.org]
-=-=-=-=-=-=-=-=-=-=-=-