summary refs log tree commit diff
path: root/nix
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-03-14 13:13:40 +0100
committerMarius Bakke <mbakke@fastmail.com>2020-03-14 13:13:40 +0100
commit961d2ee2695b38503b463d055e9c7edbcc0bf307 (patch)
tree82d9b40477a1d4d88e75a187b2b637a56751480b /nix
parent7cf79d7a51ff5dde4fc430fab2296b5f7de08953 (diff)
parentaebba13c0bef5a58697f1a9fe8337967cc01300f (diff)
downloadguix-961d2ee2695b38503b463d055e9c7edbcc0bf307.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'nix')
-rw-r--r--nix/local.mk16
1 files changed, 14 insertions, 2 deletions
diff --git a/nix/local.mk b/nix/local.mk
index dc5a8398b2..a64bdd2137 100644
--- a/nix/local.mk
+++ b/nix/local.mk
@@ -164,6 +164,16 @@ etc/guix-%.service: etc/guix-%.service.in	\
 	       "$<" > "$@.tmp";		\
 	mv "$@.tmp" "$@"
 
+sysvinitservicedir = $(sysconfdir)/init.d
+nodist_sysvinitservice_DATA = etc/init.d/guix-daemon
+
+etc/init.d/guix-daemon: etc/init.d/guix-daemon.in	\
+			 $(top_builddir)/config.status
+	$(AM_V_GEN)$(MKDIR_P) "`dirname $@`";	\
+	$(SED) -e 's|@''localstatedir''@|$(localstatedir)|' <	\
+	       "$<" > "$@.tmp";		\
+	mv "$@.tmp" "$@"
+
 # The '.conf' jobs for Upstart.
 upstartjobdir = $(libdir)/upstart/system
 nodist_upstartjob_DATA = etc/guix-daemon.conf etc/guix-publish.conf
@@ -177,7 +187,8 @@ etc/guix-%.conf: etc/guix-%.conf.in	\
 
 CLEANFILES +=					\
   $(nodist_systemdservice_DATA)			\
-  $(nodist_upstartjob_DATA)
+  $(nodist_upstartjob_DATA)			\
+  $(nodist_sysvinitservice_DATA)
 
 EXTRA_DIST +=					\
   %D%/AUTHORS					\
@@ -185,7 +196,8 @@ EXTRA_DIST +=					\
   etc/guix-daemon.service.in			\
   etc/guix-daemon.conf.in			\
   etc/guix-publish.service.in			\
-  etc/guix-publish.conf.in
+  etc/guix-publish.conf.in			\
+  etc/init.d/guix-daemon.in
 
 if CAN_RUN_TESTS