Skip to content

Commit

Permalink
units: generate ReadWritePaths= in the template
Browse files Browse the repository at this point in the history
  • Loading branch information
keszybz authored and yuwata committed May 19, 2021
1 parent 491bf10 commit 71ae5ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 1 addition & 6 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -828,15 +828,10 @@ endif
conf.set_quoted('SYSTEMD_DEFAULT_LOCALE', default_locale)

localegen_path = get_option('localegen-path')
have = false
writable = ''
if localegen_path != ''
conf.set_quoted('LOCALEGEN_PATH', localegen_path)
have = true
writable = ' /usr/lib/locale'
endif
conf.set_quoted('SERVICE_LOCALEGEN_WRITABLE', writable)
conf.set10('HAVE_LOCALEGEN', have)
conf.set10('HAVE_LOCALEGEN', localegen_path != '')

conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())

Expand Down
5 changes: 4 additions & 1 deletion units/systemd-localed.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectSystem=strict
ReadWritePaths=/etc{{SERVICE_LOCALEGEN_WRITABLE}}
ReadWritePaths=/etc
{% if HAVE_LOCALEGEN %}
ReadWritePaths=/usr/lib/locale
{% endif %}
RestrictAddressFamilies=AF_UNIX
RestrictNamespaces=yes
RestrictRealtime=yes
Expand Down

0 comments on commit 71ae5ce

Please sign in to comment.