[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 19/46] Add configure --with-initd-dir=DIR



Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
---
 Config.mk                    |  1 -
 config/Paths.mk.in           |  1 +
 docs/misc/distro_mapping.txt |  3 +--
 m4/paths.m4                  | 20 ++++++++++++++++++++
 4 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/Config.mk b/Config.mk
index 4c3a2a7..fc2e312 100644
--- a/Config.mk
+++ b/Config.mk
@@ -76,7 +76,6 @@ endef
 
 # See distro_mapping.txt for other options
 $(eval $(call setvar_dir,CONFIG_LEAF_DIR,,/etc/sysconfig,sysconfig,default))
-$(eval $(call setvar_dir,INITD_DIR,/etc,/rc.d/init.d,/rc.d/init.d,/init.d))
 
 ifneq ($(EXTRA_PREFIX),)
 EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
diff --git a/config/Paths.mk.in b/config/Paths.mk.in
index 507b6d1..c01d0ef 100644
--- a/config/Paths.mk.in
+++ b/config/Paths.mk.in
@@ -24,6 +24,7 @@ XEN_LOG_DIR              := @XEN_LOG_DIR@
 XEN_LIB_STORED           := @XEN_LIB_STORED@
 
 CONFIG_DIR               := @CONFIG_DIR@
+INITD_DIR                := @INITD_DIR@
 XEN_LOCK_DIR             := @XEN_LOCK_DIR@
 XEN_PAGING_DIR           := @XEN_PAGING_DIR@
 
diff --git a/docs/misc/distro_mapping.txt b/docs/misc/distro_mapping.txt
index f849d07..a4dea45 100644
--- a/docs/misc/distro_mapping.txt
+++ b/docs/misc/distro_mapping.txt
@@ -13,8 +13,7 @@ build host, via the "setvar_dir" macro in Config.mk) and for 
some
 scripts at run-time.  If the Red Hat directory exists, it is used;
 otherwise the Debian one is used.
 
-You can override this by setting the variables in the environment or
-your ".config" (which is included by .config).
+The path can be changed with configure --with-initd-dir=DIR
 
 To add support for new distributions that don't use the above locations,
 one must grep for the above elements and add appropriate checks.
diff --git a/m4/paths.m4 b/m4/paths.m4
index 47edca5..d33a9e6 100644
--- a/m4/paths.m4
+++ b/m4/paths.m4
@@ -22,6 +22,23 @@ if test "x$sysconfdir" = 'x${prefix}/etc' ; then
     esac
 fi
 
+AC_ARG_WITH([initd-dir],
+    AS_HELP_STRING([--with-initd-dir=DIR],
+    [Path to directory with sysv runlevel scripts. [PREFIX/etc/init.d]]),
+    [initd_dir_path=$withval],
+    [case "$host_os" in
+         *linux*)
+         if test -d $sysconfdir/rc.d/init.d ; then
+             initd_dir_path=$sysconfdir/rc.d/init.d
+         else
+             initd_dir_path=$sysconfdir/init.d
+         fi
+         ;;
+         *)
+         initd_dir_path=$sysconfdir/rc.d
+         ;;
+     esac])
+
 BINDIR=$prefix/bin
 AC_SUBST(BINDIR)
 
@@ -63,6 +80,9 @@ AC_SUBST(XENFIRMWAREDIR)
 CONFIG_DIR=$sysconfdir
 AC_SUBST(CONFIG_DIR)
 
+INITD_DIR=$initd_dir_path
+AC_SUBST(INITD_DIR)
+
 XEN_CONFIG_DIR=$CONFIG_DIR/xen
 AC_SUBST(XEN_CONFIG_DIR)
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.