summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <wjt@endlessm.com>2019-03-15 10:09:11 +0000
committerRichard Hughes <richard@hughsie.com>2019-03-15 16:31:24 +0000
commite8898694ed8d3bd4f87c8ec50d297c0a0e01ffd0 (patch)
tree3517fe96e07cd2ca633239707be7acbdf2a9b2e5
parent4627c6d76986cf2c09fc579451f8bc1069b17c4a (diff)
downloadcolord-e8898694ed8d3bd4f87c8ec50d297c0a0e01ffd0.tar.gz
data: set correct username in tmpfiles.d/colord.conf
The daemon is not guaranteed to run as a user named 'colord', since the default is -Ddaemon_user=root. Generate the file and interpolate @daemon_user@ in the same way as is done for the .service file.
-rw-r--r--data/colord.conf2
-rw-r--r--data/colord.conf.in2
-rw-r--r--data/meson.build14
3 files changed, 10 insertions, 8 deletions
diff --git a/data/colord.conf b/data/colord.conf
deleted file mode 100644
index d154045..0000000
--- a/data/colord.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-d /var/lib/colord 0755 colord colord
-d /var/lib/colord/icc 0755 colord colord
diff --git a/data/colord.conf.in b/data/colord.conf.in
new file mode 100644
index 0000000..7260751
--- /dev/null
+++ b/data/colord.conf.in
@@ -0,0 +1,2 @@
+d /var/lib/colord 0755 @daemon_user@ @daemon_user@
+d /var/lib/colord/icc 0755 @daemon_user@ @daemon_user@
diff --git a/data/meson.build b/data/meson.build
index e9bf87b..00ac6ec 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -6,12 +6,6 @@ subdir('ref')
subdir('tests')
subdir('ti1')
-if get_option('systemd')
- install_data('colord.conf',
- install_dir: systemd.get_pkgconfig_variable('tmpfilesdir')
- )
-endif
-
if get_option('bash_completion')
install_data('colormgr',
install_dir: bash_completion.get_pkgconfig_variable('completionsdir')
@@ -31,6 +25,14 @@ if get_option('systemd')
install: true,
install_dir: systemd.get_pkgconfig_variable('systemdsystemunitdir'),
)
+
+ configure_file(
+ input : 'colord.conf.in',
+ output : 'colord.conf',
+ configuration : con2,
+ install: true,
+ install_dir: systemd.get_pkgconfig_variable('tmpfilesdir')
+ )
endif
# replace @servicedir@ and @daemon_user@