* [Buildroot] Running script after init @ 2021-11-16 12:08 José Pekkarinen 2021-11-16 14:25 ` Thomas Petazzoni 0 siblings, 1 reply; 5+ messages in thread From: José Pekkarinen @ 2021-11-16 12:08 UTC (permalink / raw) To: buildroot [-- Attachment #1.1: Type: text/plain, Size: 156 bytes --] Hi, Any hint what would be the right place in buildroot userspace to put an script after the init process is over? Thanks! José Pekkarinen. [-- Attachment #1.2: Type: text/html, Size: 555 bytes --] [-- Attachment #2: Type: text/plain, Size: 150 bytes --] _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] Running script after init 2021-11-16 12:08 [Buildroot] Running script after init José Pekkarinen @ 2021-11-16 14:25 ` Thomas Petazzoni 2021-11-17 12:48 ` José Pekkarinen 0 siblings, 1 reply; 5+ messages in thread From: Thomas Petazzoni @ 2021-11-16 14:25 UTC (permalink / raw) To: José Pekkarinen; +Cc: buildroot Hello José, On Tue, 16 Nov 2021 14:08:02 +0200 José Pekkarinen <jose.pekkarinen@unikie.com> wrote: > Any hint what would be the right place in buildroot > > userspace to put an script after the init process is over? The init process by itself is never over, it continues to run until you reboot your system. Could you clarify your question? You want a service to be started after all other services? Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] Running script after init 2021-11-16 14:25 ` Thomas Petazzoni @ 2021-11-17 12:48 ` José Pekkarinen 2021-11-17 20:29 ` Arnout Vandecappelle 0 siblings, 1 reply; 5+ messages in thread From: José Pekkarinen @ 2021-11-17 12:48 UTC (permalink / raw) To: Thomas Petazzoni; +Cc: buildroot [-- Attachment #1.1: Type: text/plain, Size: 800 bytes --] On Tue, Nov 16, 2021 at 4:25 PM Thomas Petazzoni < thomas.petazzoni@bootlin.com> wrote: > Hello José, > > On Tue, 16 Nov 2021 14:08:02 +0200 > José Pekkarinen <jose.pekkarinen@unikie.com> wrote: > > > Any hint what would be the right place in buildroot > > > > userspace to put an script after the init process is over? > > The init process by itself is never over, it continues to run until you > reboot your system. > > Could you clarify your question? You want a service to be started after > all other services? > Hi, I want to run a script after the TTYs are up and running. Currently I run the script as S99myscript, and put a call in the start, and it fails. If I later logging as root and manually run the S99myscript start, it runs well. Thanks! José. [-- Attachment #1.2: Type: text/html, Size: 1736 bytes --] [-- Attachment #2: Type: text/plain, Size: 150 bytes --] _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] Running script after init 2021-11-17 12:48 ` José Pekkarinen @ 2021-11-17 20:29 ` Arnout Vandecappelle 2021-11-18 10:18 ` José Pekkarinen 0 siblings, 1 reply; 5+ messages in thread From: Arnout Vandecappelle @ 2021-11-17 20:29 UTC (permalink / raw) To: José Pekkarinen, Thomas Petazzoni; +Cc: buildroot On 17/11/2021 13:48, José Pekkarinen wrote: > > > On Tue, Nov 16, 2021 at 4:25 PM Thomas Petazzoni <thomas.petazzoni@bootlin.com > <mailto:thomas.petazzoni@bootlin.com>> wrote: > > Hello José, > > On Tue, 16 Nov 2021 14:08:02 +0200 > José Pekkarinen <jose.pekkarinen@unikie.com > <mailto:jose.pekkarinen@unikie.com>> wrote: > > > Any hint what would be the right place in buildroot > > > > userspace to put an script after the init process is over? > > The init process by itself is never over, it continues to run until you > reboot your system. > > Could you clarify your question? You want a service to be started after > all other services? > > > Hi, > > I want to run a script after the TTYs are up and running. > > Currently I run the script as S99myscript, and put a call in the > start, and it fails. If I later logging as root and manually run the > S99myscript start, it runs well. The ttys are started immediately after the last script in /etc/init.d has finished, so it's unlikely a problem due to sequencing. More likely, the difference you observe is due to the difference in environment between an interactive login and when the init script is executed directly by init. To debug your init script, you can start it with #! /bin/sh -x This will echo each command before it is executed, which will help to determine where it fails. Regards, Arnout _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] Running script after init 2021-11-17 20:29 ` Arnout Vandecappelle @ 2021-11-18 10:18 ` José Pekkarinen 0 siblings, 0 replies; 5+ messages in thread From: José Pekkarinen @ 2021-11-18 10:18 UTC (permalink / raw) To: Arnout Vandecappelle; +Cc: Thomas Petazzoni, buildroot [-- Attachment #1.1: Type: text/plain, Size: 1844 bytes --] On Wed, Nov 17, 2021 at 10:29 PM Arnout Vandecappelle <arnout@mind.be> wrote: > > > On 17/11/2021 13:48, José Pekkarinen wrote: > > > > > > On Tue, Nov 16, 2021 at 4:25 PM Thomas Petazzoni < > thomas.petazzoni@bootlin.com > > <mailto:thomas.petazzoni@bootlin.com>> wrote: > > > > Hello José, > > > > On Tue, 16 Nov 2021 14:08:02 +0200 > > José Pekkarinen <jose.pekkarinen@unikie.com > > <mailto:jose.pekkarinen@unikie.com>> wrote: > > > > > Any hint what would be the right place in buildroot > > > > > > userspace to put an script after the init process is over? > > > > The init process by itself is never over, it continues to run until > you > > reboot your system. > > > > Could you clarify your question? You want a service to be started > after > > all other services? > > > > > > Hi, > > > > I want to run a script after the TTYs are up and running. > > > > Currently I run the script as S99myscript, and put a call in the > > start, and it fails. If I later logging as root and manually run the > > S99myscript start, it runs well. > > The ttys are started immediately after the last script in /etc/init.d > has > finished, so it's unlikely a problem due to sequencing. More likely, the > difference you observe is due to the difference in environment between an > interactive login and when the init script is executed directly by init. > > To debug your init script, you can start it with > > #! /bin/sh -x > > This will echo each command before it is executed, which will help to > determine > where it fails. > Thanks for the hints, the problem was actually in the script since it referenced some files relatively, and for the init script it requires absolute path. Now it works. Best regards. José. [-- Attachment #1.2: Type: text/html, Size: 3043 bytes --] [-- Attachment #2: Type: text/plain, Size: 150 bytes --] _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-11-18 10:18 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-11-16 12:08 [Buildroot] Running script after init José Pekkarinen 2021-11-16 14:25 ` Thomas Petazzoni 2021-11-17 12:48 ` José Pekkarinen 2021-11-17 20:29 ` Arnout Vandecappelle 2021-11-18 10:18 ` José Pekkarinen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox