From 754cb67ce5ddb920426fe33ec69b85fa0378bb8d Mon Sep 17 00:00:00 2001 From: Gordon Hecker Date: Wed, 27 May 2009 13:30:44 +0200 Subject: [PATCH] add SYSCONFDIR to buildconfig and replace hardcoded path Signed-off-by: Gordon Hecker --- Makefile | 1 + generic/e2lib.lua | 10 +++++----- templates/Makefile | 12 ++++++------ 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index a6e582e..ca7922e 100644 --- a/Makefile +++ b/Makefile @@ -47,6 +47,7 @@ buildconfig.lua: Makefile make.vars @echo 'BINDIR="$(BINDIR)"' >>$@ @echo 'LIBDIR="$(LIBDIR)"' >>$@ @echo 'TOOLDIR="$(TOOLDIR)"' >>$@ + @echo 'SYSCONFDIR="$(SYSCONFDIR)"' >>$@ @echo 'E2="$(E2)"' >>$@ @echo 'LUA="$(LUA)"' >>$@ @echo 'E2_SYNTAX="$(E2_SYNTAX)"' >>$@ diff --git a/generic/e2lib.lua b/generic/e2lib.lua index 1a47457..5066034 100644 --- a/generic/e2lib.lua +++ b/generic/e2lib.lua @@ -90,7 +90,7 @@ e2lib = { cmdline = {}, git_skip_checkout = true, buildnumber_server_url = nil, - template_path = "/etc/e2/templates", + template_path = string.format("%s/templates", buildconfig.SYSCONFDIR), extension_config = ".e2/extensions", } @@ -771,11 +771,11 @@ function e2lib.read_global_config(e2_config_file) string.format("%s/.e2/e2.conf-%s.%s", e2lib.homedir, buildconfig.MAJOR, buildconfig.MINOR), string.format("%s/.e2/e2.conf", e2lib.homedir), - string.format("/etc/e2/e2.conf-%s.%s.%s", + string.format("%s/e2.conf-%s.%s.%s", buildconfig.SYSCONFDIR, buildconfig.MAJOR, buildconfig.MINOR, buildconfig.PATCHLEVEL), - string.format("/etc/e2/e2.conf-%s.%s", buildconfig.MAJOR, - buildconfig.MINOR), - string.format("/etc/e2/e2.conf"), + string.format("%s/e2.conf-%s.%s", buildconfig.SYSCONFDIR, + buildconfig.MAJOR, buildconfig.MINOR), + string.format("%s/e2.conf", buildconfig.SYSCONFDIR), } end -- use ipairs to keep the list entries ordered diff --git a/templates/Makefile b/templates/Makefile index 8665be3..5866b19 100644 --- a/templates/Makefile +++ b/templates/Makefile @@ -38,12 +38,12 @@ all: clean: install: all - install -m 755 -d $(DESTDIR)/etc/e2/templates/proj - install -m 644 proj/config $(DESTDIR)/etc/e2/templates/proj/config - install -m 644 proj/chroot $(DESTDIR)/etc/e2/templates/proj/chroot - install -m 644 proj/licences $(DESTDIR)/etc/e2/templates/proj/licences - install -m 644 proj/env $(DESTDIR)/etc/e2/templates/proj/env - install -m 644 gitignore $(DESTDIR)/etc/e2/templates/gitignore + install -m 755 -d $(DESTDIR)$(SYSCONFDIR)/templates/proj + install -m 644 proj/config $(DESTDIR)$(SYSCONFDIR)/templates/proj/config + install -m 644 proj/chroot $(DESTDIR)$(SYSCONFDIR)/templates/proj/chroot + install -m 644 proj/licences $(DESTDIR)$(SYSCONFDIR)/templates/proj/licences + install -m 644 proj/env $(DESTDIR)$(SYSCONFDIR)/templates/proj/env + install -m 644 gitignore $(DESTDIR)$(SYSCONFDIR)/templates/gitignore install-local: all install -m 755 -d $(LOCALLIBDIR)/templates -- 2.39.5