]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: generate ReadWritePaths= in the template
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 16 May 2021 18:13:14 +0000 (20:13 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 19 May 2021 01:25:26 +0000 (10:25 +0900)
meson.build
units/systemd-localed.service.in

index 171c3dda73794ceaffebfec85439faf32fb5f274..8b1871523f121be839ec67dd621228e358ad9321 100644 (file)
@@ -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())
 
index abd32266aeb6e6620712dd5f9a634eb54b69ee6b..f9a92fef7beeb9c68dd346f84a3ce181bba7f3e8 100644 (file)
@@ -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