freebsd-ports/www/apache13-fp/files/patch-fb
Bill Fumerola e6503fb81a Upgrade to the latest and greatest apache/frontpage combo.
PR:		ports/16974
Submitted by:	maintainer
2000-03-01 06:25:15 +00:00

303 lines
7.7 KiB
Plaintext

--- frontpage/version4.0/fp_install.sh.orig Mon May 24 12:45:14 1999
+++ frontpage/version4.0/fp_install.sh Thu Feb 24 20:22:48 2000
@@ -48,7 +48,7 @@
{
VERSION="4.0"
PATH=".:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/etc:/usr/bsd"
- INSTALLDIRDEFAULT="/usr/local/frontpage"
+ INSTALLDIRDEFAULT="PREFIX/frontpage"
case "`echo 'x\c'`" in
'x\c') echo="echo -n" nnl= ;; #BSD
@@ -68,6 +68,9 @@
IRIX*) machine="sgi" ;;
SunOS*5.*sun4*) machine="solaris" ;;
SunOS*5.*i386*) machine="solarisx86" ;;
+ FreeBSD* | \
+ NetBSD* | \
+ OpenBSD* | \
BSD/OS*) machine="bsdi" ;;
SCO_SV*) machine="sco5" ;;
UnixWare\ *\ *\ 7*\ i*) machine="uware7" ;;
@@ -128,7 +131,7 @@
checkuser()
{
#
- # Make sure we are not running as root.
+ # Make sure we are running as root.
#
whoami=`whoami 2>/dev/null` || whoami=`/usr/bin/id | sed -e ' s/).*//; s/^.*(//;'`
@@ -321,27 +324,27 @@
retval=0
- echo
- echo "Where would you like to install the FrontPage Extensions. If you"
- echo "select a location other than /usr/local/frontpage/ then a symbolic"
- echo "link will be created from /usr/local/frontpage/ to the location that"
- echo "is chosen."
- echo
- $echo "FrontPage Extensions directory [/usr/local/frontpage/]: ${nnl}"
- read installdir
+# echo
+# echo "Where would you like to install the FrontPage Extensions. If you"
+# echo "select a location other than /usr/local/frontpage/ then a symbolic"
+# echo "link will be created from /usr/local/frontpage/ to the location that"
+# echo "is chosen."
+# echo
+# $echo "FrontPage Extensions directory [${INSTALLDIRDEFAULT}]: ${nnl}"
+# read installdir
- if [ "$installdir" = "" ]
- then
+# if [ "$installdir" = "" ]
+# then
installdir=$INSTALLDIRDEFAULT
- fi
+# fi
installdir=`dirname $installdir`/`basename $installdir`
- if [ ! -d "$installdir" ]
- then
- echo "Creating $installdir"
- if mkdir "$installdir"
- then
- echo "Directory $installdir has been created."
+# if [ ! -d "$installdir" ]
+# then
+# echo "Creating $installdir"
+# if mkdir "$installdir"
+# then
+# echo "Directory $installdir has been created."
if chmod "$prot" "$installdir"
then
echo "Directory $installdir chmoded to $prot."
@@ -349,22 +352,22 @@
echo "ERROR: Unable to chmod $installdir to $prot."
retval=1
fi
- else
- echo "ERROR: Unable to create $installdir!"
- retval=1
- fi
- else
- echo "WARNING: Directory $installdir already exists."
- echo "Installation will overwrite existing files."
- echo
-
- myprompt 'yYnN' "Continue the installation (y/n)" "N"
- echo
- if [ $answer = n ] || [ $answer = N ]
- then
- exit 0
- fi
- fi
+# else
+# echo "ERROR: Unable to create $installdir!"
+# retval=1
+# fi
+# else
+# echo "WARNING: Directory $installdir already exists."
+# echo "Installation will overwrite existing files."
+# echo
+
+# myprompt 'yYnN' "Continue the installation (y/n)" "N"
+# echo
+# if [ $answer = n ] || [ $answer = N ]
+# then
+# exit 0
+# fi
+# fi
if [ "$installdir" != "/usr/local/frontpage" ]
then
@@ -414,7 +417,7 @@
vtfile="fp40.$machine.tar"
echo "Platform is $machine."
- vtfilelocation="`pwd`/"
+ vtfilelocation="/usr/ports/distfiles/"
getextfilename $vtfilelocation $vtfile || return 1
@@ -538,7 +541,7 @@
upgrade="no"
echo "For details on how to upgrade servers manually, please see"
echo "the Server Extension Resource Kit (SERK), located in"
- echo "/usr/local/frontpage/version${VERSION}/serk"
+ echo "MOD_FPDOCDIR/serk"
echo
return $retval
else
@@ -655,10 +658,15 @@
*pache*) getHttpDirective $configfile AccessConfig $port
if [ "$param" != "" ]
then
- file=`basename $param`
- accessconffile="${configfiledir}${file}"
+ if [ "${param}" = "/dev/null" ]
+ then
+ accessconffile="${configfile}"
+ else
+ file=`basename $param`
+ accessconffile="${configfiledir}${file}"
+ fi
else
- accessconffile="${configfiledir}access.conf"
+ accessconffile="${configfiledir}conf/access.conf"
fi
if [ ! -f "$accessconffile" ]
@@ -1105,18 +1113,29 @@
webname="/"
+ defconfigfile="PREFIX/etc/apache/httpd.conf"
+
configfile=""
while ( [ "$configfile" = "" ] || [ ! -f $configfile ] )
do
- $echo "Server config filename: ${nnl}"
+ $echo "Server config filename: [$defconfigfile] ${nnl}"
read configfile
- done
+ if [ "$configfile" = "" ]
+ then
+ configfile=$defconfigfile
+ fi
+done
+ defadmin="fpadmin"
admin=""
until [ "$admin" != "" ]
do
- $echo "FrontPage Administrator's user name: ${nnl}"
+ $echo "FrontPage Administrator's user name: [$defadmin] ${nnl}"
read admin
+ if [ "$admin" = "" ]
+ then
+ admin=$defadmin
+ fi
done
getparam Port $configfile
@@ -1131,6 +1150,39 @@
getparam User $configfile
defwebowner=$param
+ if [ "$defwebowner" = "" ]
+ then
+ getHttpDirective $configfile ResourceConfig $port
+ if [ "$param" != "" ]
+ then
+ if [ "${param}" = "/dev/null" ]
+ then
+ resconffile="${configfile}"
+ else
+ file=`basename $param`
+ resconffile="${configfiledir}${file}"
+ fi
+ else
+ resconffile="${configfiledir}srm.conf"
+ fi
+
+ if [ ! -f "$resconffile" ]
+ then
+ echo "ERROR: $resconffile does not exist!"
+ return 1
+ fi
+
+ getparam DocumentRoot $resconffile
+ docroot=$param
+ if [ ! -d "$docroot" ]
+ then
+ echo "ERROR: $docroot does not exist!"
+ return 1
+ fi
+
+ defwebowner=`$lsg ${docroot}${service} | $awk ' { print $3}'`
+ fi
+
weconfigfile="${installdir}/we${port}.cnf"
webowner=""
@@ -1146,6 +1198,12 @@
getparam Group $configfile
defgroup=$param
+
+ if [ "$defgroup" = "" ]
+ then
+ defgroup=`$lsg ${docroot}${service} | $awk ' { print $4}'`
+ fi
+
webgroup=""
until [ "$webgroup" != "" ]
do
@@ -1157,6 +1215,8 @@
webgroup=$defgroup
fi
done
+
+defservertypenum="3"
until [ "$servertype" != "" ]
do
@@ -1167,9 +1227,13 @@
echo " 4. netscape-fasttrack"
echo " 5. netscape-enterprise"
echo " 6. stronghold"
- $echo "What type of Server is this: ${nnl}"
+ $echo "What type of Server is this: [$defservertypenum] ${nnl}"
read servertypenum
echo
+ if [ "$servertypenum" = "" ]
+ then
+ servertypenum=$defservertypenum
+ fi
case $servertypenum in
"1") servertype="ncsa" ;;
@@ -1545,6 +1609,8 @@
read admin
done
+ defservertypenum="3"
+
until [ "$servertype" != "" ]
do
echo
@@ -1554,9 +1620,13 @@
echo " 4. netscape-fasttrack"
echo " 5. netscape-enterprise"
echo " 6. stronghold"
- $echo "What type of Server is this: ${nnl}"
+ $echo "What type of Server is this: [$defservertypenum] ${nnl}"
read servertypenum
echo
+ if [ "$servertypenum" = "" ]
+ then
+ servertypenum=$defservertypenum
+ fi
case $servertypenum in
"1") servertype="ncsa" ;;
@@ -2023,7 +2093,6 @@
then
getHttpRootDirective $configfile $directive
fi
-
}
getnetscapedocroot()
@@ -2216,7 +2285,7 @@
initialize
step1
-step2
+#step2
step3
#
# Run the external permissions script.