This patch enables iprutils supportconfig plugin for SLES when the user
specifies ./configure --enable-supportconfig. Autotools will send iprsos script
to /usr/lib/supporconfig/plugins and when one issues the supportconfig command,
the script will generate a report containing the plugin-iprsos.txt file.
If one wants the iprsos be sent to another directory, s/he must specify it with
--enable-supportconfig=<path>.
---
Including some changes suggested by Gabriel, not including the symlink to
iprsos, as we will enable either sosreport or supportconfig. Also, we are still
to verify if SuSE keeps a separate repository for the supportconfig plugins. We
can later remove it from our package if so. Thanks.
Makefile.am | 4 ++++
configure.ac | 19 +++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index 4636ecb..121ec3f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -53,3 +53,7 @@ if SOSREPORT
sosreportdir = @pythondir@/sos/plugins
sosreport_PYTHON = iprutils.py
endif
+
+if SUPPORTCONFIG
+supportconfig_SCRIPTS = iprsos
+endif
diff --git a/configure.ac b/configure.ac
index 6e25fe3..99ea87f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,6 +55,25 @@ AC_ARG_ENABLE([sosreport],
esac], [sosreport=true])
AM_CONDITIONAL([SOSREPORT], [test "x${sosreport}" = xtrue])
+# --enable-supportconfig.
+supportconfigdir='${exec_prefix}/usr/lib/supportconfig/plugins'
+AC_ARG_ENABLE([supportconfig],
+ [--enable-supportconfig Install supportconfig plugin],
+[case "${enableval}" in
+ yes)
+ supportconfig=true
+ ;;
+ no)
+ supportconfig=false
+ ;;
+ *)
+ supportconfig=true;
+ supportconfigdir="$enableval"
+ ;;
+ esac], [supportconfig=false])
+AM_CONDITIONAL([SUPPORTCONFIG], [test "x${supportconfig}" = xtrue])
+AC_SUBST(supportconfigdir, ${supportconfigdir})
+
# --with-systemd
systemdunitdir='${exec_prefix}/usr/lib/systemd/system/'
AC_ARG_WITH([systemd],
--
1.9.1
------------------------------------------------------------------------------
_______________________________________________
Iprdd-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iprdd-devel