|
Lines 1-35
Link Here
|
| 1 |
--- frontpage/version4.0/change_server.sh.orig Mon May 24 13:27:07 1999 |
1 |
--- frontpage/version4.0/change_server.sh.orig Mon May 1 11:03:32 2000 |
| 2 |
+++ frontpage/version4.0/change_server.sh Thu Feb 24 20:39:30 2000 |
2 |
+++ frontpage/version4.0/change_server.sh Mon May 15 21:21:29 2000 |
| 3 |
@@ -38,9 +38,11 @@ |
3 |
@@ -38,9 +38,12 @@ |
| 4 |
{ |
4 |
{ |
| 5 |
VERSION="4.0" |
5 |
VERSION="4.0" |
| 6 |
PATH=".:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/etc:/usr/bsd" |
6 |
PATH=".:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/etc:/usr/bsd" |
| 7 |
- NEWHTTPDNEW="/usr/local/frontpage/version${VERSION}/apache-fp/httpd" |
7 |
- NEWHTTPDNEW="/usr/local/frontpage/version${VERSION}/apache-fp/httpd" |
| 8 |
- NEWHTTPDCOMPAT="/usr/local/frontpage/version${VERSION}/apache-fp/httpd.Compat" |
8 |
- NEWHTTPDCOMPAT="/usr/local/frontpage/version${VERSION}/apache-fp/httpd.Compat" |
| 9 |
- DEFAULTHTTPD="/usr/local/apache/sbin/httpd" |
9 |
- DEFAULTHTTPD="/usr/local/apache/sbin/httpd" |
| 10 |
+ NEWHTTPDNEW="PREFIX/sbin/httpd" |
10 |
+ AP_TARGET=`PREFIX/sbin/apxs -q TARGET` |
|
|
11 |
+ NEWHTTPDNEW="PREFIX/sbin/${AP_TARGET}" |
| 11 |
+ NEWMODFPNEW="PREFIX/libexec/apache/mod_frontpage.so" |
12 |
+ NEWMODFPNEW="PREFIX/libexec/apache/mod_frontpage.so" |
| 12 |
+ NEWHTTPDCOMPAT="${NEWHTTPDNEW}" |
13 |
+ NEWHTTPDCOMPAT="${NEWHTTPDNEW}" |
| 13 |
+ NEWMODFPCOMAPT="${NEWMODFPNEW}" |
14 |
+ NEWMODFPCOMAPT="${NEWMODFPNEW}" |
| 14 |
+ DEFAULTHTTPD="PREFIX/sbin/httpd" |
15 |
+ DEFAULTHTTPD="PREFIX/sbin/${AP_TARGET}" |
| 15 |
|
16 |
|
| 16 |
case "`echo 'x\c'`" in |
17 |
case "`echo 'x\c'`" in |
| 17 |
'x\c') echo="echo -n" nnl= ;; #BSD |
18 |
'x\c') echo="echo -n" nnl= ;; #BSD |
| 18 |
@@ -60,6 +62,9 @@ |
19 |
@@ -217,8 +220,22 @@ |
| 19 |
IRIX*) machine="sgi" ;; |
|
|
| 20 |
SunOS*5.*sun4*) machine="solaris" ;; |
| 21 |
SunOS*5.*i386*) machine="solarisx86" ;; |
| 22 |
+ FreeBSD* | \ |
| 23 |
+ NetBSD* | \ |
| 24 |
+ OpenBSD* | \ |
| 25 |
BSD/OS*) machine="bsdi" ;; |
| 26 |
SCO_SV*) machine="sco5" ;; |
| 27 |
UnixWare\ *\ *\ 7*\ i*) machine="uware7" ;; |
| 28 |
@@ -214,6 +219,20 @@ |
| 29 |
|
20 |
|
| 30 |
clear |
21 |
clear |
| 31 |
|
22 |
|
| 32 |
+ if ($strings $httpdfile | $fgrep "etc/apache/httpd.conf" > /dev/null) |
23 |
+ if ($strings $httpdfile | $fgrep "etc/apache/${AP_TARGET}.conf" > /dev/null) |
| 33 |
+ then |
24 |
+ then |
| 34 |
+ NEWHTTPD=$NEWHTTPDNEW |
25 |
+ NEWHTTPD=$NEWHTTPDNEW |
| 35 |
+ NEWMODFP=$NEWMODFPNEW |
26 |
+ NEWMODFP=$NEWMODFPNEW |
|
Lines 44-52
Link Here
|
| 44 |
+ sed -e 's%^.*FrontPage/\([0-9\.]*\).*%\1%' | tail -1` |
35 |
+ sed -e 's%^.*FrontPage/\([0-9\.]*\).*%\1%' | tail -1` |
| 45 |
+ else |
36 |
+ else |
| 46 |
|
37 |
|
| 47 |
if ($strings $httpdfile | $fgrep "etc/httpd.conf" > /dev/null) |
38 |
- if ($strings $httpdfile | $fgrep "etc/httpd.conf" > /dev/null) |
|
|
39 |
+ if ($strings $httpdfile | $fgrep "etc/${AP_TARGET}.conf" > /dev/null) |
| 48 |
then |
40 |
then |
| 49 |
@@ -232,7 +251,8 @@ |
41 |
NEWHTTPD=$NEWHTTPDNEW |
|
|
42 |
echo "Selected server uses NEW directory structure:" |
| 43 |
@@ -235,7 +252,8 @@ |
| 50 |
sourceVersionNumber=`$NEWHTTPD -v | sed 's%^.*Apache/\([0-9\.]*\).*%\1%' | head -1` |
44 |
sourceVersionNumber=`$NEWHTTPD -v | sed 's%^.*Apache/\([0-9\.]*\).*%\1%' | head -1` |
| 51 |
sourceFPVersionNumber=`$strings $NEWHTTPD | $fgrep "FrontPage/" 2> /dev/null | sed -e ' |
45 |
sourceFPVersionNumber=`$strings $NEWHTTPD | $fgrep "FrontPage/" 2> /dev/null | sed -e ' |
| 52 |
s%^.*FrontPage/\([0-9\.]*\).*%\1%' | tail -1` |
46 |
s%^.*FrontPage/\([0-9\.]*\).*%\1%' | tail -1` |
|
Lines 56-190
Link Here
|
| 56 |
echo |
50 |
echo |
| 57 |
echo "Currently running Apache/${targetVersionNumber} FrontPage/${nnl}" |
51 |
echo "Currently running Apache/${targetVersionNumber} FrontPage/${nnl}" |
| 58 |
if [ "${targetFPVersionNumber}" = "" ] |
52 |
if [ "${targetFPVersionNumber}" = "" ] |
| 59 |
@@ -496,10 +516,19 @@ |
|
|
| 60 |
*pache*) getHttpDirective $configfile AccessConfig $port |
| 61 |
if [ "$param" != "" ] |
| 62 |
then |
| 63 |
- file=`basename $param` |
| 64 |
- accessconffile="${configfiledir}${file}" |
| 65 |
+ if [ "$param" != "/dev/null" ] |
| 66 |
+ then |
| 67 |
+ file=`basename $param` |
| 68 |
+ accessconffile="${configfiledir}${file}" |
| 69 |
+ else |
| 70 |
+ configError |
| 71 |
+ fi |
| 72 |
else |
| 73 |
- accessconffile="${configfiledir}access.conf" |
| 74 |
+ accessconffile="${configfiledir}conf/access.conf" |
| 75 |
+ if [ ! -f "$accessconffile" ] |
| 76 |
+ then |
| 77 |
+ configError2 |
| 78 |
+ fi |
| 79 |
fi |
| 80 |
|
| 81 |
if [ ! -f "$accessconffile" ] |
| 82 |
@@ -1061,10 +1090,19 @@ |
| 83 |
getHttpDirective $configfile ResourceConfig $port |
| 84 |
if [ "$param" != "" ] |
| 85 |
then |
| 86 |
- file=`basename $param` |
| 87 |
- resconffile="${configfiledir}${file}" |
| 88 |
+ if [ "$param" != "/dev/null" ] |
| 89 |
+ then |
| 90 |
+ file=`basename $param` |
| 91 |
+ resconffile="${configfiledir}${file}" |
| 92 |
+ else |
| 93 |
+ configError |
| 94 |
+ fi |
| 95 |
else |
| 96 |
- resconffile="${configfiledir}srm.conf" |
| 97 |
+ resconffile="${configfiledir}conf/srm.conf" |
| 98 |
+ if [ ! -f "$resconffile" ] |
| 99 |
+ then |
| 100 |
+ configError2 |
| 101 |
+ fi |
| 102 |
fi |
| 103 |
echo "Getting DocumentRoot from $resconffile." |
| 104 |
getparam DocumentRoot $resconffile |
| 105 |
@@ -1081,10 +1119,19 @@ |
| 106 |
resconffile=$param |
| 107 |
if [ "$param" != "" ] |
| 108 |
then |
| 109 |
- file=`basename $param` |
| 110 |
- resconffile="${configfiledir}${file}" |
| 111 |
+ if [ "$param" != "/dev/null" ] |
| 112 |
+ then |
| 113 |
+ file=`basename $param` |
| 114 |
+ resconffile="${configfiledir}${file}" |
| 115 |
+ else |
| 116 |
+ configError |
| 117 |
+ fi |
| 118 |
else |
| 119 |
- resconffile="${configfiledir}srm.conf" |
| 120 |
+ resconffile="${configfiledir}conf/srm.conf" |
| 121 |
+ if [ ! -f "$resconffile" ] |
| 122 |
+ then |
| 123 |
+ configError2 |
| 124 |
+ fi |
| 125 |
fi |
| 126 |
echo "Getting UserDir from $resconffile." |
| 127 |
getparam UserDir $resconffile |
| 128 |
@@ -1108,10 +1155,19 @@ |
| 129 |
*) getHttpDirective $configfile ResourceConfig $port |
| 130 |
if [ "$param" != "" ] |
| 131 |
then |
| 132 |
- file=`basename $param` |
| 133 |
- resconffile="${configfiledir}${file}" |
| 134 |
+ if [ "$param" != "/dev/null" ] |
| 135 |
+ then |
| 136 |
+ file=`basename $param` |
| 137 |
+ resconffile="${configfiledir}${file}" |
| 138 |
+ else |
| 139 |
+ configError |
| 140 |
+ fi |
| 141 |
else |
| 142 |
- resconffile="${configfiledir}srm.conf" |
| 143 |
+ resconffile="${configfiledir}conf/srm.conf" |
| 144 |
+ if [ ! -f "$resconffile" ] |
| 145 |
+ then |
| 146 |
+ configError2 |
| 147 |
+ fi |
| 148 |
fi |
| 149 |
|
| 150 |
if [ ! -f "$resconffile" ] |
| 151 |
@@ -1253,6 +1309,39 @@ |
| 152 |
getHttpRootDirective $configfile $directive |
| 153 |
fi |
| 154 |
|
| 155 |
+} |
| 156 |
+ |
| 157 |
+configError() |
| 158 |
+{ |
| 159 |
+ echo |
| 160 |
+ echo "ERROR: ${configfile} invalid format" |
| 161 |
+ echo "Change ${configfile} as follows:" |
| 162 |
+ echo |
| 163 |
+ echo " ResourceConfig ${configfile}" |
| 164 |
+ echo " AccessConfig ${configfile}" |
| 165 |
+ echo |
| 166 |
+ $echo "hit enter to continue${nnl}" |
| 167 |
+ read continue |
| 168 |
+ echo "Ouch!!!!!!!!!!!!! Not so hard, gently please" |
| 169 |
+ echo |
| 170 |
+ exit 1 |
| 171 |
+} |
| 172 |
+ |
| 173 |
+configError2() |
| 174 |
+{ |
| 175 |
+ echo |
| 176 |
+ echo "ERROR: ${configfile} invalid" |
| 177 |
+ echo |
| 178 |
+ echo "Change ${configfile} as follows:" |
| 179 |
+ echo |
| 180 |
+ echo " ResourceConfig ${configfiledir}srm.conf" |
| 181 |
+ echo " AccessConfig ${configfiledir}access.conf" |
| 182 |
+ echo |
| 183 |
+ $echo "hit enter to continue${nnl}" |
| 184 |
+ read continue |
| 185 |
+ echo "Ouch!!!!!!!!!!!!! Not so hard, gently please" |
| 186 |
+ echo |
| 187 |
+ exit 1 |
| 188 |
} |
| 189 |
|
| 190 |
error() |