diff options
author | Rich Megginson <rmeggins@redhat.com> | 2010-02-26 11:18:09 -0700 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2010-02-26 16:13:32 -0700 |
commit | 2accc35200d504503a9bfeffcb9a0de1b2ccc327 (patch) | |
tree | 440851a92d09f5c6baeb46181b6432f8ca5e4366 /configure.ac | |
parent | 9c0edff0cffc5d5aa62b4edb74133008b72b8e94 (diff) | |
download | ds-2accc35200d504503a9bfeffcb9a0de1b2ccc327.tar.gz ds-2accc35200d504503a9bfeffcb9a0de1b2ccc327.tar.xz ds-2accc35200d504503a9bfeffcb9a0de1b2ccc327.zip |
Bug 460162 - FedoraDS "with-FHS" installs init.d StartupScript in wrong location on non-RHEL/Fedora OS
https://bugzilla.redhat.com/show_bug.cgi?id=460162
Resolves: bug 460162
Bug Description: FedoraDS "with-FHS" installs init.d StartupScript in wrong location on non-RHEL/Fedora OS
Reviewed by: nkinder (Thanks!)
Branch: HEAD
Fix Description: There is no LSB or FHS standard for the init script location,
and it varies widely across systems and even linux distros. I've added
a --with-initddir (default $(sysconfig)/rc.d) so that the location can be
specified. Note that this changes the initdir parameter to be an absolute
path, instead of relative to sysconfdir. Some systems do not use /etc at all
for this (e.g. HPUX uses /init.d).
Platforms tested: RHEL5 x86_64
Flag Day: yes - autotool file change
Doc impact: no
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 6bf9f8aa..68a6d80c 100644 --- a/configure.ac +++ b/configure.ac @@ -312,8 +312,22 @@ AC_SUBST(instconfigdir) AM_CONDITIONAL([WINNT], false) # Deal with platform dependent defines -# relative to sysconfdir -initdir=/rc.d +# initdir is the location for the SysV init scripts - very heavily platform +# dependent and not specified in fhs or lsb +initdir='$(sysconfdir)/rc.d' +AC_MSG_CHECKING(for --with-initddir) +AC_ARG_WITH(initddir, + AS_HELP_STRING([--with-initddir=/path], + [Absolute path (not relative like some of the other options) that should contain the SysV init scripts (default '$(sysconfdir)/rc.d')]), +[ + if test "$withval" = yes -o "$withval" = no ; then + AC_ERROR([Please specify a full path with --with-initddir]) + fi + AC_MSG_RESULT($withval) +], +[ + AC_MSG_RESULT(no) +]) # on most platforms, we will just use perl from PATH # On some platforms, we cannot. Why not just use any old # perl? Because of perldap. We use a perldap that is @@ -332,8 +346,7 @@ case $host in AC_DEFINE([LINUX2_4], [1], [Linux 2.4]) AC_DEFINE([_GNU_SOURCE], [1], [GNU Source]) platform="linux" - # relative to sysconfdir - initdir=/rc.d/init.d + initdir='$(sysconfdir)/rc.d/init.d' # do arch specific linux stuff here case $host in i*86-*-linux*) @@ -369,6 +382,8 @@ case $host in perlexec='/opt/perl_64/bin/perl' platform="hpux" initconfigdir="/$PACKAGE_NAME/config" + # HPUX doesn't use /etc for this + initdir=/init.d ;; hppa*-hp-hpux*) AC_DEFINE([XP_UNIX], [1], [UNIX]) @@ -386,6 +401,8 @@ case $host in initconfigdir="/$PACKAGE_NAME/config" perlexec='/opt/perl_64/bin/perl' platform="hpux" + # HPUX doesn't use /etc for this + initdir=/init.d ;; sparc-sun-solaris*) AC_DEFINE([XP_UNIX], [1], [UNIX]) @@ -416,13 +433,17 @@ dnl Cstd and Crun are required to link any C++ related code platform="solaris" # assume 64 bit perlexec='/usr/lib/sparcv9/dirsec/perl5x/bin/perl' - # relative to sysconfdir - initdir=/init.d + initdir='$(sysconfdir)/init.d' ;; *) platform="" ;; esac + +# cmd line overrides default setting above +if test -n "$with_initddir" ; then + initdir="$with_initddir" +fi AC_SUBST(initdir) AC_SUBST(perlexec) |