You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

79 lines
2.5 KiB

Index: installer.pl
--- modsurvey-3.2.6/installer.pl.orig 2006-01-23 13:05:47 +0100
+++ modsurvey-3.2.6/installer.pl 2006-03-05 15:35:07 +0100
@@ -184,12 +184,13 @@
$windows = 0;
$distrib = "unix/generic";
$source = "./";
-$destination = "/usr/local/mod_survey/";
+$destination = "@l_prefix@/lib/modsurvey/";
+$destination_prefix = $ENV{'RPM_BUILD_ROOT'};
$creator = 1;
$conf{"_SURVEY_ALLOWAUTO"} = 1;
-$webuser = "apache";
-$webgroup = "apache";
+$webuser = "@l_nusr@";
+$webgroup = "@l_ngrp@";
sub isWindows()
{
@@ -513,7 +514,7 @@
print " windows\n";
print "\nWhich platform are we installing for? [" . $distrib . "] ";
-$distrib = &getAnswer($distrib);
+# $distrib = &getAnswer($distrib);
print "Platform is: $distrib\n\n\n";
$nowpart++;
@@ -540,8 +541,8 @@
$destination = &getAnswer($destination);
print "Installing in $destination.\n\n\n";
-$conf{"_SURVEY_ROOT"} = $destination . "webroot/";
-$conf{"_SURVEY_SYSBASE"} = $destination . "data/";
+$conf{"_SURVEY_ROOT"} = "@l_prefix@/share/modsurvey/webroot/";
+$conf{"_SURVEY_SYSBASE"} = "@l_prefix@/var/modsurvey/data/";
$conf{"_SURVEY_LANG_DIRECTORY"} = $destination . "Lang/";
$nowpart++;
@@ -566,7 +567,7 @@
}
else
{
- ($webuser, $webgroup) = &getUidGid();
+ # ($webuser, $webgroup) = &getUidGid();
print "In order to correctly set file security for the files in the\n";
print "Mod_Survey installation directory, we need to know determine under\n";
@@ -681,7 +682,7 @@
print "option.\n\n";
print "Do you want to set PerlSendHeader to \"On\"? [no] ";
-$yesno = lc(&getAnswer("no"));
+$yesno = lc(&getAnswer("yes"));
if (($yesno ne "no") && ($yesno ne "n"))
{
print "PerlSendHeader On\n";
@@ -926,16 +927,14 @@
system "mkdir " . &osFix($destination);
-&makeDir($destination);
-&copyCoreFiles($source, $destination);
+&makeDir($destination_prefix.$destination);
+&copyCoreFiles($source, $destination_prefix.$destination);
if (!$windows)
{
print "Chmodding/chowning files and directories... ";
- system "chown 0:0 -R $destination";
- system "chmod 755 -R $destination";
- system "chown $webuser" . ":" . "$webgroup $destination" . "data";
- system "chmod 700 $destination" . "data";
+ system "chmod -R 755 ${destination_prefix}${destination}";
+ system "chmod 700 ${destination_prefix}${destination}" . "data";
print "ok\n";
}