* [Buildroot] Add crontab entries from package @ 2020-11-26 10:03 Sven Klomp 2020-11-26 19:05 ` Peter Seiderer 0 siblings, 1 reply; 3+ messages in thread From: Sven Klomp @ 2020-11-26 10:03 UTC (permalink / raw) To: buildroot Hello, I want to add entries to /etc/crontabs/root. I know I can add abritary scripts to |BR2_ROOTFS_POST_BUILD_SCRIPT| to change files. However, as the crontab entry depends on the package, I want to change the file from within thepackage and not globally. How is this possible? The documentation of |BR2_ROOTFS_POST_BUILD_SCRIPT |makes me think there must be another solution: "You should, however, use this feature with care. Whenever you find that a certain package generates wrong or unneeded files, you should fix that package rather than work around it with some post-build cleanup scripts." Thanks Sven || ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] Add crontab entries from package 2020-11-26 10:03 [Buildroot] Add crontab entries from package Sven Klomp @ 2020-11-26 19:05 ` Peter Seiderer [not found] ` <b7ab5353-8504-055c-fcde-b1130dd53c43@klomp.eu> 0 siblings, 1 reply; 3+ messages in thread From: Peter Seiderer @ 2020-11-26 19:05 UTC (permalink / raw) To: buildroot Hello Sven, On Thu, 26 Nov 2020 11:03:00 +0100, Sven Klomp <mail@klomp.eu> wrote: > Hello, > > I want to add entries to /etc/crontabs/root. > I know I can add abritary scripts to |BR2_ROOTFS_POST_BUILD_SCRIPT| to > change files. However, as the crontab entry depends on the package, I > want to change the file from within thepackage and not globally. How is > this possible? > The documentation of |BR2_ROOTFS_POST_BUILD_SCRIPT |makes me think there > must be another solution: > "You should, however, use this feature with care. Whenever you find that > a certain package generates wrong or unneeded files, you should fix that > package rather than work around it with some post-build cleanup scripts." Maybe use a root filesystem overlay/BR2_ROOTFS_OVERLAY (see [1])... Regards, Peter [1] https://buildroot.org/downloads/manual/manual.html#rootfs-custom > > > Thanks > Sven > || > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <b7ab5353-8504-055c-fcde-b1130dd53c43@klomp.eu>]
[parent not found: <20201127235210.06a62c2a@gmx.net>]
* [Buildroot] Add crontab entries from package [not found] ` <20201127235210.06a62c2a@gmx.net> @ 2020-11-27 22:53 ` Peter Seiderer 0 siblings, 0 replies; 3+ messages in thread From: Peter Seiderer @ 2020-11-27 22:53 UTC (permalink / raw) To: buildroot And re-add CC: buildroot at buildroot.org, sorry for missing it... Regards, Peter On Fri, 27 Nov 2020 23:52:10 +0100, Peter Seiderer <ps.report@gmx.net> wrote: > Hello Sven, > > On Fri, 27 Nov 2020 11:40:03 +0100, Sven Klomp <mail@klomp.eu> wrote: > > > Hello Peter, > > > > On 26.11.20 20:05, Peter Seiderer wrote: > > >> I want to add entries to /etc/crontabs/root. > > >> I know I can add abritary scripts to |BR2_ROOTFS_POST_BUILD_SCRIPT| to > > >> change files. However, as the crontab entry depends on the package, I > > >> want to change the file from within thepackage and not globally. How is > > >> this possible? > > >> The documentation of |BR2_ROOTFS_POST_BUILD_SCRIPT |makes me think there > > >> must be another solution: > > >> "You should, however, use this feature with care. Whenever you find that > > >> a certain package generates wrong or unneeded files, you should fix that > > >> package rather than work around it with some post-build cleanup scripts." > > > Maybe use a root filesystem overlay/BR2_ROOTFS_OVERLAY (see [1])... > > > > > > Regards, > > > Peter > > > > > > [1] https://buildroot.org/downloads/manual/manual.html#rootfs-custom > > > > > > > Thanks for the hint. If my understanding is correct, this is also a > > global approach (i.e. if I don't install my package, the crontab gets > > still changed). > > Yes you are right (I did not catch the 'from package' of the subject line)... > > > But maybe there is no other solution from within the package. > > Do the same as for sysv or systemd init files, provide a custom one from your > package and install it, see e.g. DHCPCD_INSTALL_INIT_SYSV/DHCPCD_INSTALL_INIT_SYSTEMD > from dhcpcd ([2])... > > Regards, > Peter > > [2] https://git.buildroot.net/buildroot/tree/package/dhcpcd/dhcpcd.mk#n43 > > > > > Best regards > > Sven > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-27 22:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-26 10:03 [Buildroot] Add crontab entries from package Sven Klomp
2020-11-26 19:05 ` Peter Seiderer
[not found] ` <b7ab5353-8504-055c-fcde-b1130dd53c43@klomp.eu>
[not found] ` <20201127235210.06a62c2a@gmx.net>
2020-11-27 22:53 ` Peter Seiderer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox