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

--- a/installer/install.sh
+++ b/installer/install.sh
@@ -19,10 +19,11 @@
 
 PATH=".:/bin:/usr/bin:/usr/local/bin:$PATH"
 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.
@@ -146,7 +147,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
@@ -307,14 +308,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:
@@ -379,7 +380,7 @@
 		echo "*** change TWMAILMETHOD to SMTP and set SMTP"
 		echo "*** settings appropriately."
 		echo ""
-        	exit 1
+        	#exit 1
 	fi
 else
         echo "Using SMTP mail protocol."
@@ -629,6 +630,9 @@
 fi
 
 
+## agi
+exit 0
+##
 ##=======================================================
 ## Files are now present on user's system.
 ## Begin Tripwire configuration.
--- a/installer/install.cfg
+++ b/installer/install.cfg
@@ -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}"
