From fcc4798072755610f476313219cf20f2ccef1b2d Mon Sep 17 00:00:00 2001
From: obarun <eric@obarun.org>
Date: Mon, 2 Aug 2021 12:09:02 +1100
Subject: [PATCH] fix installation of the init.conf skeleton file

---
 Makefile  | 14 ++------------
 configure |  2 +-
 2 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/Makefile b/Makefile
index 6151e7d9..f4bc0b05 100644
--- a/Makefile
+++ b/Makefile
@@ -65,8 +65,7 @@ endif
 INSTALL_HTML := $(wildcard doc/$(version)/html/*.html)
 INSTALL_MAN := $(wildcard doc/man/*/*)
 INSTALL_DATA := skel/halt skel/init skel/poweroff skel/rc.init skel/rc.init.container \
-	skel/rc.shutdown skel/reboot skel/shutdown skel/rc.shutdown.final
-INSTALL_CONF := skel/init.conf
+	skel/rc.shutdown skel/reboot skel/shutdown skel/rc.shutdown.final skel/init.conf
 
 all: $(ALL_LIBS) $(ALL_BINS) $(ALL_INCLUDES)
 
@@ -100,7 +99,6 @@ install-bin: $(BIN_TARGETS:%=$(DESTDIR)$(bindir)/%)
 install-lib: $(STATIC_LIBS:lib%.a.xyzzy=$(DESTDIR)$(libdir)/lib%.a)
 install-include: $(ALL_INCLUDES:src/include/$(package)/%.h=$(DESTDIR)$(includedir)/$(package)/%.h)
 install-data: $(INSTALL_DATA:skel/%=$(DESTDIR)$(skel)/%)
-install-conf: $(INSTALL_CONF:skel/%=$(DESTDIR)$(sysconfdir)/66/%)
 install-html: $(INSTALL_HTML:doc/$(version)/html/%.html=$(DESTDIR)$(datarootdir)/doc/$(package)/$(version)/%.html)
 install-man: install-man1 install-man5 install-man8
 install-man1: $(INSTALL_MAN:doc/man/man1/%.1=$(DESTDIR)$(mandir)/man1/%.1)
@@ -218,14 +216,6 @@ $(DESTDIR)$(mandir)/man8/%.8: doc/man/man8/%.8
 		-e 's,%%service_userconf%%,$(service_userconf),g' \
 		-e 's,%%user_log%%,$(user_log),g' $< > $@
 
-$(DESTDIR)$(sysconfdir)/66/%: skel/%
-	exec $(INSTALL) -D -m 644 $< $@
-	grep -- ^$(@F) < package/modes | { read name mode owner && \
-	if [ x$$owner != x ] ; then chown -- $$owner $@ ; fi && \
-	chmod $$mode $@ ; } && \
-	exec sed -e "s/@LIVEDIR@/$(subst /,\/,$(livedir))/g" \
-			-e "s/@SKEL@/$(subst /,\/,$(skel))/g" $< > $@
-
 $(DESTDIR)$(skel)/%: skel/%
 	exec $(INSTALL) -D -m 644 $< $@
 	grep -- ^$(@F) < package/modes | { read name mode owner && \
@@ -269,6 +259,6 @@ lib%.a.xyzzy:
 lib%.so.xyzzy:
 	exec $(CC) -o $@ $(CFLAGS_ALL) $(CFLAGS_SHARED) $(LDFLAGS_ALL) $(LDFLAGS_SHARED) -Wl,-soname,$(patsubst lib%.so.xyzzy,lib%.so.$(version_M),$@) $^ $(EXTRA_LIBS) $(LDLIBS)
 
-.PHONY: it all clean distclean tgz strip install install-dynlib install-libexec install-bin install-lib install-include install-data install-conf install-html install-man
+.PHONY: it all clean distclean tgz strip install install-dynlib install-libexec install-bin install-lib install-include install-data install-html install-man
 
 .DELETE_ON_ERROR:
diff --git a/configure b/configure
index 53bdfeef..4f4eff60 100755
--- a/configure
+++ b/configure
@@ -636,7 +636,7 @@ All rights reserved.*/
 #define ${package_macro_name}_VERSION "$version"
 #define ${package_macro_name}_LIVE "$livedir/"
 #define ${package_macro_name}_SYSTEM_DIR "$system_dir/"
-#define ${package_macro_name}_SKEL_DIR "$sysconfdir/66/"
+#define ${package_macro_name}_SKEL_DIR "$skel/"
 #define ${package_macro_name}_LOGGER_SYSDIR "$system_log/"
 #define ${package_macro_name}_LOGGER_RUNNER "$s6log_user"
 #define ${package_macro_name}_LOGGER_TIMESTAMP $s6log_timestamp
-- 
GitLab