1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-14 23:46:10 +00:00
freebsd-ports/www/apache13-fp/files/patch-fa

157 lines
5.4 KiB
Plaintext
Raw Normal View History

--- frontpage/version3.0/change_server.sh.orig Thu Mar 5 06:00:22 1998
+++ frontpage/version3.0/change_server.sh Fri Jan 22 23:03:20 1999
@@ -38,9 +38,9 @@
{
VERSION="3.0"
PATH=".:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/etc"
- NEWHTTPD="/usr/local/frontpage/currentversion/apache-fp/httpd"
+ NEWHTTPD="PREFIX/sbin/httpd"
UPGRADEVERSION=`$NEWHTTPD -v`
- DEFAULTHTTPD="/usr/local/etc/httpd/httpd"
+ DEFAULTHTTPD="PREFIX/sbin/httpd"
case "`echo 'x\c'`" in
'x\c') echo="echo -n" nnl= ;; #BSD
@@ -59,6 +59,9 @@
IRIX*) machine="sgi" ;;
SunOS*5.*sun4*) machine="solaris" ;;
SunOS*4.*sun4*) machine="sunos";;
+ FreeBSD* | \
+ NetBSD* | \
+ OpenBSD* | \
*BSD/OS?3.0*) machine="bsdi3" ;;
BSD/OS*) machine="bsdi" ;;
SCO_SV*) machine="sco5" ;;
@@ -366,10 +369,19 @@
*pache*) getHttpDirective $configfile AccessConfig $port
if [ "$param" != "" ]
then
- file=`basename $param`
- accessconffile="${configfiledir}${file}"
+ if [ "$param" != "/dev/null" ]
+ then
+ file=`basename $param`
+ accessconffile="${configfiledir}${file}"
+ else
+ configError
+ fi
else
- accessconffile="${configfiledir}access.conf"
+ accessconffile="${configfiledir}conf/access.conf"
+ if [ ! -f "$accessconffile" ]
+ then
+ configError2
+ fi
fi
if [ ! -f "$accessconffile" ]
@@ -932,10 +944,19 @@
getHttpDirective $configfile ResourceConfig $port
if [ "$param" != "" ]
then
- file=`basename $param`
- resconffile="${configfiledir}${file}"
+ if [ "$param" != "/dev/null" ]
+ then
+ file=`basename $param`
+ resconffile="${configfiledir}${file}"
+ else
+ configError
+ fi
else
- resconffile="${configfiledir}srm.conf"
+ resconffile="${configfiledir}conf/srm.conf"
+ if [ ! -f "$resconffile" ]
+ then
+ configError2
+ fi
fi
echo "Getting DocumentRoot from $resconffile."
getparam DocumentRoot $resconffile
@@ -952,10 +973,19 @@
resconffile=$param
if [ "$param" != "" ]
then
- file=`basename $param`
- resconffile="${configfiledir}${file}"
+ if [ "$param" != "/dev/null" ]
+ then
+ file=`basename $param`
+ resconffile="${configfiledir}${file}"
+ else
+ configError
+ fi
else
- resconffile="${configfiledir}srm.conf"
+ resconffile="${configfiledir}conf/srm.conf"
+ if [ ! -f "$resconffile" ]
+ then
+ configError2
+ fi
fi
echo "Getting UserDir from $resconffile."
getparam UserDir $resconffile
@@ -979,10 +1009,19 @@
*) getHttpDirective $configfile ResourceConfig $port
if [ "$param" != "" ]
then
- file=`basename $param`
- resconffile="${configfiledir}${file}"
+ if [ "$param" != "/dev/null" ]
+ then
+ file=`basename $param`
+ resconffile="${configfiledir}${file}"
+ else
+ configError
+ fi
else
- resconffile="${configfiledir}srm.conf"
+ resconffile="${configfiledir}conf/srm.conf"
+ if [ ! -f "$resconffile" ]
+ then
+ configError2
+ fi
fi
if [ ! -f "$resconffile" ]
@@ -1124,6 +1163,39 @@
getHttpRootDirective $configfile $directive
fi
+}
+
+configError()
+{
+ echo
+ echo "ERROR: ${configfile} invalid format"
+ echo "Change ${configfile} as follows:"
+ echo
+ echo " ResourceConfig ${configfile}"
+ echo " AccessConfig ${configfile}"
+ echo
+ $echo "hit enter to continue${nnl}"
+ read continue
+ echo "Ouch!!!!!!!!!!!!! Not so hard, gently please"
+ echo
+ exit 1
+}
+
+configError2()
+{
+ echo
+ echo "ERROR: ${configfile} invalid"
+ echo
+ echo "Change ${configfile} as follows:"
+ echo
+ echo " ResourceConfig ${configfiledir}srm.conf"
+ echo " AccessConfig ${configfiledir}access.conf"
+ echo
+ $echo "hit enter to continue${nnl}"
+ read continue
+ echo "Ouch!!!!!!!!!!!!! Not so hard, gently please"
+ echo
+ exit 1
}
error()