diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-04-26 12:14:24 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-04-26 12:18:25 -0400 |
commit | 8261595374d60057f3bfeb143be5b2d8486426c4 (patch) | |
tree | 3b5f5b952e20e447b70c5c2aa6b04368a9f08be5 | |
parent | 1e37851585ef96db8ed304fbdf5d3c9696560584 (diff) |
Update for systemd 235
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | systemd-timesyncd.service.d-wait.conf.in | 3 |
2 files changed, 6 insertions, 2 deletions
@@ -8,8 +8,11 @@ ge = $(shell test '$1' -ge '$2' && echo yes) TIMESYNCD_PATH = $(rootlibexecdir)/systemd-timesyncd RM = /bin/rm +CHOWN = /bin/chown INFINITY = $(if $(call ge,$(systemd_version),229),infinity,0) ReadWritePaths = $(if $(call ge,$(systemd_version),231),ReadWritePaths,ReadWriteDirectories) +BANGBANG = $(if $(call ge,$(systemd_version),235),!!,) +BANGCHOWN = $(if $(call ge,$(systemd_version),235),+$(CHOWN),/bin/true) #### @@ -35,7 +38,7 @@ install: $(addprefix $(DESTDIR),$(files.sys.all)) $(outdir)/%: $(srcdir)/%.go go build -o $@ $< -vars = rootlibexecdir TIMESYNCD_PATH RM INFINITY ReadWritePaths +vars = rootlibexecdir TIMESYNCD_PATH RM INFINITY ReadWritePaths BANGBANG BANGCHOWN $(outdir)/%: $(srcdir)/%.in sed $(foreach v,$(vars),-e 's|@$v@|$($v)|g') < $< > $@ diff --git a/systemd-timesyncd.service.d-wait.conf.in b/systemd-timesyncd.service.d-wait.conf.in index b2c630a..7acfbb6 100644 --- a/systemd-timesyncd.service.d-wait.conf.in +++ b/systemd-timesyncd.service.d-wait.conf.in @@ -5,8 +5,9 @@ After=systemd-timesyncd-wait.socket [Service] Sockets= ExecStart= -ExecStart=@rootlibexecdir@/systemd-timesyncd-wrap @TIMESYNCD_PATH@ +ExecStart=@BANGBANG@@rootlibexecdir@/systemd-timesyncd-wrap @TIMESYNCD_PATH@ ExecStopPost=@RM@ -f -- /run/timesyncd/notify.sock ExecStartPre=@RM@ -f -- /run/timesyncd/notify.sock +ExecStartPre=@BANGCHOWN@ systemd-timesync /run/timesyncd @ReadWritePaths@=/run/timesyncd NotifyAccess=all |