tripwire (2.4.2.2-1) quiet_install

Summary

 install/install.cfg |    8 ++++----
 install/install.sh  |   34 +++++++++++++++++++---------------
 2 files changed, 23 insertions(+), 19 deletions(-)

    
download this patch

Patch contents

Description: Make installation process unattended
Author: Alberto Gonzalez Iniesta <agi@inittab.org>
Last-Update: 2010-07-02

Index: tripwire-2.4.2/install/install.sh
===================================================================
--- tripwire-2.4.2.orig/install/install.sh	2010-07-06 10:31:37.309160279 +0000
+++ tripwire-2.4.2/install/install.sh	2010-07-06 10:50:24.389239995 +0000
@@ -19,10 +19,11 @@
 
 PATH='.:/bin:/usr/bin'
 export PATH || (echo 'You must use sh to run this script'; kill $$)
-if [ ! -t 0 ] ; then
-	echo "Say 'sh install.sh', not 'sh < install.sh'"
-	exit 1
-fi
+# Don't check if we're in a terminal, building the package does not need it
+# if [ ! -t 0 ] ; then
+# 	echo "Say 'sh install.sh', not 'sh < install.sh'"
+# 	exit 1
+# fi
 
 ##-------------------------------------------------------
 ## The usage message.
@@ -184,7 +185,7 @@
 CLOBBER="false"
 
 # If prompt==true, ask for confirmation before continuing with install.
-PROMPT="true"
+PROMPT="false"
 
 # Guess where the toplevel for the distribution is.
 # A bad guess is the current directory
@@ -333,14 +334,14 @@
 ## passphrases must be specified on the command line.
 ##-------------------------------------------------------
 
-if [ "$PROMPT" = "false" ] ; then
-	if [ -z "$TW_SITE_PASS" ] || [ -z "$TW_LOCAL_PASS" ] ; then
-		echo "Error: You must specify site and local passphrase" 1>&2
-		echo "if no prompting is chosen." 1>&2
-		echo "$USAGE"
-		exit 1
-    fi
-fi
+# if [ "$PROMPT" = "false" ] ; then
+# 	if [ -z "$TW_SITE_PASS" ] || [ -z "$TW_LOCAL_PASS" ] ; then
+# 		echo "Error: You must specify site and local passphrase" 1>&2
+# 		echo "if no prompting is chosen." 1>&2
+# 		echo "$USAGE"
+# 		exit 1
+#     fi
+# fi
 
 ##-------------------------------------------------------
 ## For each pathname variable:
@@ -405,7 +406,7 @@
 		echo "*** change TWMAILMETHOD to SMTP and set SMTP"
 		echo "*** settings appropriately."
 		echo ""
-        	exit 1
+        	#exit 1
 	fi
 else
         echo "Using SMTP mail protocol."
@@ -425,7 +426,7 @@
         echo
 else
         echo "${TWEDITOR} does not exist.  Exiting."
-        exit 1
+        #exit 1
 fi
 
 ##-------------------------------------------------------
@@ -605,6 +606,9 @@
        	fi
 done
 
+## agi
+exit 0
+##
 ##=======================================================
 ## Files are now present on user's system.
 ## Begin Tripwire configuration.
Index: tripwire-2.4.2/install/install.cfg
===================================================================
--- tripwire-2.4.2.orig/install/install.cfg	2010-07-06 10:31:37.317138458 +0000
+++ tripwire-2.4.2/install/install.cfg	2010-07-06 10:31:43.929140469 +0000
@@ -27,16 +27,16 @@
 TWBIN="${prefix}/sbin"
 
 # Tripwire policy files are stored in TWPOLICY.
-TWPOLICY="${sysconfdir}"
+TWPOLICY="${prefix}/../${sysconfdir}"
 
 # Tripwire manual pages are stored in TWMAN.
-TWMAN="${prefix}/man"
+TWMAN="${prefix}/share/man"
 
 # Tripwire database files are stored in TWDB.
-TWDB="${prefix}/lib/tripwire"
+TWDB="${prefix}/../var/lib/tripwire"
 
 # Tripwire documents directory
-TWDOCS="${prefix}/doc/tripwire"
+TWDOCS="${prefix}/share/doc/tripwire"
 
 # The Tripwire site key files are stored in TWSITEKEYDIR.
 TWSITEKEYDIR="${TWPOLICY}"