Commit 8e811b00 authored by Leigh Stoller's avatar Leigh Stoller

The apache restart file and config file are different for Apache2.

parent 6cd688f9
......@@ -87,6 +87,7 @@ WITH_EMULAB = @WITH_EMULAB@
OPSVM_ENABLE = @OPSVM_ENABLE@
OPSVM_MOUNTPOINT= @OPSVM_MOUNTPOINT@
APACHE_VERSION = @APACHE_VERSION@
APACHE_START_COMMAND = @APACHE_START_COMMAND@
host_cpu = @host_cpu@
......
......@@ -862,6 +862,7 @@ SSH_ARGS
INSTALL_RCDIR
INSTALL_APACHE_CONFIG
APACHE_VERSION
APACHE_START_COMMAND
BRAINSTEM_DIR
OPT_CFLAGS
EVENTSYS
......@@ -5582,9 +5583,11 @@ else
if test "$foo" = ""; then
INSTALL_APACHE_CONFIG="/usr/local/etc/apache"
APACHE_VERSION="1.3"
APACHE_START_COMMAND="/usr/local/etc/rc.d/apache.sh"
else
INSTALL_APACHE_CONFIG="/usr/local/etc/apache22"
APACHE_VERSION="22"
APACHE_START_COMMAND="/usr/local/etc/rc.d/apache22"
fi
fi
......@@ -5592,6 +5595,7 @@ fi
#
# Path to garcia installation
#
......
......@@ -670,13 +670,16 @@ AC_ARG_WITH(apache-config-dir,
if test "$foo" = ""; then
INSTALL_APACHE_CONFIG="/usr/local/etc/apache"
APACHE_VERSION="1.3"
APACHE_START_COMMAND="/usr/local/etc/rc.d/apache.sh"
else
INSTALL_APACHE_CONFIG="/usr/local/etc/apache22"
APACHE_VERSION="22"
APACHE_START_COMMAND="/usr/local/etc/rc.d/apache22"
fi
])
AC_SUBST(INSTALL_APACHE_CONFIG)
AC_SUBST(APACHE_VERSION)
AC_SUBST(APACHE_START_COMMAND)
#
# Path to garcia installation
......
......@@ -30,6 +30,7 @@ my $PGENISUPPORT = @PROTOGENI_SUPPORT@;
my $TBBASE = "@TBBASE@";
my $WWWBUNDLE = "$TB/www/genica.bundle";
my $BUNDLE = "$TB/etc/genica.bundle";
my $APACHE_START = "@APACHE_START_COMMAND@";
# un-taint path
$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin:/usr/site/bin';
......@@ -77,7 +78,7 @@ if ($?) {
system("/bin/mv /tmp/cabundle.$$ $BUNDLE") == 0
or fatal("Could not copy to $BUNDLE!");
system("/usr/local/etc/rc.d/apache.sh restart") == 0
system("$APACHE_START restart") == 0
or fatal("Could not restart apache!");
}
......
#!/usr/bin/perl -w
#
# GENIPUBLIC-COPYRIGHT
# Copyright (c) 2008-2009 University of Utah and the Flux Group.
# Copyright (c) 2008-2011 University of Utah and the Flux Group.
# All rights reserved.
#
use strict;
......@@ -31,6 +31,7 @@ my $TBBASE = "@TBBASE@";
my $WWWBUNDLE = "$TB/www/genicrl.bundle";
my $BUNDLE = "$TB/etc/genicrl.bundle";
my $POSTCRL = "$TB/sbin/protogeni/postcrl";
my $APACHE_START = "@APACHE_START_COMMAND@";
# un-taint path
$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin:/usr/site/bin';
......@@ -105,13 +106,13 @@ if ($?) {
system("/bin/mv /tmp/crlbundle.$$ $BUNDLE") == 0
or fatal("Could not copy to $BUNDLE!");
system("/usr/local/etc/rc.d/apache.sh restart") == 0
system("$APACHE_START restart") == 0
or fatal("Could not restart apache!");
system("/bin/cp $BUNDLE $WWWBUNDLE") == 0
or fatal("Could not copy to $WWWBUNDLE!");
system("/usr/local/etc/rc.d/apache.sh restart") == 0
system("$APACHE_START restart") == 0
or fatal("Could not restart apache!");
}
# Apache spits out stuff. No errors at this point, nothing to report.
......
#!/usr/bin/perl -w
#
# GENIPUBLIC-COPYRIGHT
# Copyright (c) 2008-2009 University of Utah and the Flux Group.
# Copyright (c) 2008-2011 University of Utah and the Flux Group.
# All rights reserved.
#
use strict;
......@@ -34,6 +34,7 @@ my $OPENSSL = "/usr/bin/openssl";
my $POSTCRL = "$TB/sbin/protogeni/postcrl";
my $GENCRL = "$TB/sbin/protogeni/gencrl";
my $LOCALCRL = "$TB/ssl/crl.pem";
my $APACHE_START = "@APACHE_START_COMMAND@";
# un-taint path
$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin:/usr/site/bin';
......@@ -210,7 +211,7 @@ if ($?) {
}
if ($restartapache) {
system("/usr/local/etc/rc.d/apache.sh restart") == 0
system("$APACHE_START restart") == 0
or fatal("Could not restart apache!");
}
......
#!/usr/bin/perl -w
#
# GENIPUBLIC-COPYRIGHT
# Copyright (c) 2008-2010 University of Utah and the Flux Group.
# Copyright (c) 2008-2011 University of Utah and the Flux Group.
# All rights reserved.
#
use strict;
......@@ -52,6 +52,7 @@ my $MYSQLSHOW = "/usr/local/bin/mysqlshow";
my $MYSQLDUMP = "/usr/local/bin/mysqldump";
my $PKG_INFO = "/usr/sbin/pkg_info";
my $FETCH = "/usr/bin/fetch";
my $APACHE_START = "@APACHE_START_COMMAND@";
# un-taint path
$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin:/usr/site/bin';
......
......@@ -59,6 +59,10 @@ my $MYSQLDUMP = "/usr/local/bin/mysqldump";
my $PKG_INFO = "/usr/sbin/pkg_info";
my $FETCH = "/usr/bin/fetch";
my $OPENSSL = "/usr/bin/openssl";
my $APACHE_START = "@APACHE_START_COMMAND@";
my $APACHE_CONF = "@INSTALL_APACHE_CONFIG@/httpd.conf";
my $APACHE_FLAGS = ("@APACHE_VERSION@" == "22" ?
"apache22_flags" ? "apache_flags");
# un-taint path
$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin:/usr/site/bin';
......@@ -321,26 +325,19 @@ if (! -e "$TB/ssl/index.txt.attr" ||
my $restartapache = 0;
if (system("egrep -q -s 'PGENI' /usr/local/etc/apache/httpd.conf")) {
if (system("egrep -q -s 'PGENI' $APACHE_CONF")) {
print "Please go to the apache subdir of your build tree and do:\n";
print " gmake\n";
print " sudo gmake install\n";
$restartapache++;
}
if (system("egrep -q -s 'DPGENI' /etc/rc.conf")) {
print "Please add 'apache_flags=\"-DSSL -DPGENI\"' to /etc/rc.conf\n";
$restartapache++;
}
if (!system("egrep -q -s 'apache_flags=\"-DSSL' " .
"/usr/local/etc/rc.d/apache.sh")) {
system("sed -i .backup 's/apache_flags=\"-DSSL/" .
"apache_flags=\"\${apache_flags--DSSL}/' " .
"/usr/local/etc/rc.d/apache.sh");
print "Please add '$APACHE_FLAGS=\"-DSSL -DPGENI\"' to /etc/rc.conf\n";
$restartapache++;
}
if ($restartapache) {
print "Then restart apache:\n";
print " sudo /usr/local/etc/rc.d/apache.sh restart\n";
print " sudo $APACHE_START restart\n";
print "Then rerun this script\n";
exit(1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment