Skip to content

Commit

Permalink
api: adjust settings for log4j-hotpatch-enabled
Browse files Browse the repository at this point in the history
The new settings will generate the configurations needed to log
deprecation warning in the journal.

Signed-off-by: Arnaldo Garcia Rincon <[email protected]>
  • Loading branch information
arnaldo2792 committed Sep 1, 2023
1 parent 38410d3 commit e3bc71d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/release/log4j-hotpatch-enabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{~#if settings.oci-hooks.log4j-hotpatch-enabled~}}
DEPRECATED_SETTING=oci-hooks.log4j-hotpatch-enabled
{{~/if~}}
2 changes: 1 addition & 1 deletion packages/release/release-tmpfiles.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
C /etc/nsswitch.conf - - - -
d /etc/deprecated-settings/ 0700 root root -
d /etc/deprecated-settings 0700 root root -
d /var/log/kdump 0700 root root -
d /sys/fs/cgroup/cpuset/runtime.slice 0755 root root -
d /sys/fs/cgroup/hugetlb/runtime.slice 0755 root root -
Expand Down
11 changes: 11 additions & 0 deletions sources/models/shared-defaults/oci-hooks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,14 @@ restart-commands = []
[configuration-files.oci-hooks]
path = "/etc/shimpei/shimpei-hooks.json"
template-path = "/usr/share/templates/oci-default-hooks-json"

[metadata.settings.oci-hooks.log4j-hotpatch-enabled]
affected-services = ["log4j-hotpatch-enabled"]

[services.log4j-hotpatch-enabled]
configuration-files = ["log4j-hotpatch-enabled-log-message"]
restart-commands = ["systemctl restart [email protected]"]

[configuration-files.log4j-hotpatch-enabled-log-message]
path = "/etc/deprecated-settings/log4j-hotpatch-enabled"
template-path = "/usr/share/templates/log4j-hotpatch-enabled"

0 comments on commit e3bc71d

Please sign in to comment.