[OE-core] [PATCH v2] systemd: Allow custom coredump config options
Andre McCurdy
armccurdy at gmail.com
Wed Jul 18 23:48:00 UTC 2018
On Wed, Jul 18, 2018 at 3:53 PM, Alistair Francis
<alistair.francis at wdc.com> wrote:
> If the user has enabled coredump let's allow them to customise the
> config options.
>
> Signed-off-by: Alistair Francis <alistair.francis at wdc.com>
> ---
> meta/recipes-core/systemd/systemd_239.bb | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/meta/recipes-core/systemd/systemd_239.bb b/meta/recipes-core/systemd/systemd_239.bb
> index 7822548993..a625d060a9 100644
> --- a/meta/recipes-core/systemd/systemd_239.bb
> +++ b/meta/recipes-core/systemd/systemd_239.bb
> @@ -279,6 +279,18 @@ do_install() {
> chown polkitd:root ${D}${datadir}/polkit-1/rules.d
> fi
> fi
> +
> + # If coredump was enabled, enable it in the config.
> + # This just sets the default, but can be used to customise the values.
> + if ${@bb.utils.contains('PACKAGECONFIG', 'coredump', 'true', 'false', d)}; then
> + sed 's|#Storage.*|Storage=external|g' -i ${D}${sysconfdir}/systemd/coredump.conf
> + sed 's|#Compress.*|Compress=yes|g' -i ${D}${sysconfdir}/systemd/coredump.conf
> + sed 's|#ProcessSizeMax.*|ProcessSizeMax=2G|g' -i ${D}${sysconfdir}/systemd/coredump.conf
> + sed 's|#ExternalSizeMax.*|ExternalSizeMax=2G|g' -i ${D}${sysconfdir}/systemd/coredump.conf
> + sed 's|#JournalSizeMax.*|JournalSizeMax=767M|g' -i ${D}${sysconfdir}/systemd/coredump.conf
> + sed 's|#MaxUse.*|MaxUse=|g' -i ${D}${sysconfdir}/systemd/coredump.conf
> + sed 's|#KeepFree.*|KeepFree=|g' -i ${D}${sysconfdir}/systemd/coredump.conf
How does this allow the user to customise the config options?
By forcing the options to the _current_ default values you are
creating a maintenance problem - ie you'll still be forcing these
values even if/when the upstream defaults are changed.
> + fi
> }
>
>
> --
> 2.17.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
More information about the Openembedded-core
mailing list