Fwd: Logwatch CVS install to prefix corrected patch

"Kirk Bauer" <[email protected]>
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
---------- Forwarded message ----------
From: Craig Ruff <[email protected]>
Date: Nov 27, 2007 9:36 AM
Subject: Logwatch CVS install to prefix corrected patch
To: [email protected]


This patch sets the munge_* variables properly when using --preifx
with install_logwatch.sh.

--

Craig Ruff              NCAR                        [email protected]
303-497-1211            P.O. Box 3000
                        Boulder, CO  80307



-- 
Kirk Bauer <[email protected]>
http://linux.kaybee.org | www.logwatch.org
Author, Automating UNIX & Linux Administration

_______________________________________________
Logwatch-Devel mailing list
[email protected]
http://www2.list.logwatch.org:81/mailman/listinfo/logwatch-devel
install-prefix-diff (text/plain, 1 KB)
--- install_logwatch.sh.orig	Tue Nov 27 09:23:36 2007
+++ install_logwatch.sh	Tue Nov 27 09:34:33 2007
@@ -56,6 +56,40 @@
 PERLEXE="/usr/bin/perl"
 MANDIR="/usr/share/man"
 
+ac_prev=
+for ac_option
+do
+    # If the previous option needs an argument, assign it.
+    if test -n "$ac_prev"; then
+        eval "$ac_prev=\$ac_option"
+        ac_prev=
+        continue
+    fi
+
+    ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+    case $ac_option in
+        -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+            ac_prev=prefix ;;
+        -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+            prefix=$ac_optarg ;;
+
+        *)
+            echo "Unknown option '$ac_option'"
+            ;;
+    esac
+done
+
+if [ "x$prefix" != "x" ]; then
+    BASEDIR=$prefix
+    munge_base=1
+    CONFIGDIR=$BASEDIR/etc
+   munge_conf=1
+    TEMPDIR=$BASEDIR/tmp
+    munge_temp=1
+    MANDIR=$BASEDIR/man
+fi
+
 #Talk to user
 printf "#################################\n"
 printf "Preparing to install Logwatch\n"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.