diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-09-09 11:38:13 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-09-09 11:38:13 -0400 |
commit | 1e37851585ef96db8ed304fbdf5d3c9696560584 (patch) | |
tree | 6fcaedf98dd7a33ef358e37155c668b8e6d7b313 /Makefile | |
parent | 860f47bfc21e2634d5a87af6b8e171d07f8aba62 (diff) |
wait.conf: Write ReadWritePaths= as ReadWriteDirectories= for sd < 231
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -4,10 +4,12 @@ rootlibexecdir = $(rootprefix)/lib/systemd systemunitdir=$(rootprefix)/lib/systemd/system systemd_version = $(shell systemctl --version|sed -n '1{s/\S*\s\s*//;s/\s.*//;p}') +ge = $(shell test '$1' -ge '$2' && echo yes) TIMESYNCD_PATH = $(rootlibexecdir)/systemd-timesyncd RM = /bin/rm -INFINITY = $(shell if test $(systemd_version) -ge 229; then echo infinity; else echo 0; fi) +INFINITY = $(if $(call ge,$(systemd_version),229),infinity,0) +ReadWritePaths = $(if $(call ge,$(systemd_version),231),ReadWritePaths,ReadWriteDirectories) #### @@ -33,7 +35,7 @@ install: $(addprefix $(DESTDIR),$(files.sys.all)) $(outdir)/%: $(srcdir)/%.go go build -o $@ $< -vars = rootlibexecdir TIMESYNCD_PATH RM INFINITY +vars = rootlibexecdir TIMESYNCD_PATH RM INFINITY ReadWritePaths $(outdir)/%: $(srcdir)/%.in sed $(foreach v,$(vars),-e 's|@$v@|$($v)|g') < $< > $@ |