summaryrefslogtreecommitdiff
path: root/www/apache13-fp/files/patch-fa
blob: 352a2f74baf81e2f5a31b1c7a64e0ba935068457 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
--- frontpage/version4.0/change_server.sh.orig	Mon May 24 13:27:07 1999
+++ frontpage/version4.0/change_server.sh	Thu Feb 24 20:39:30 2000
@@ -38,9 +38,11 @@
 {
   VERSION="4.0"
   PATH=".:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/etc:/usr/bsd"
-  NEWHTTPDNEW="/usr/local/frontpage/version${VERSION}/apache-fp/httpd"
-  NEWHTTPDCOMPAT="/usr/local/frontpage/version${VERSION}/apache-fp/httpd.Compat"
-  DEFAULTHTTPD="/usr/local/apache/sbin/httpd"
+  NEWHTTPDNEW="PREFIX/sbin/httpd"
+  NEWMODFPNEW="PREFIX/libexec/apache/mod_frontpage.so"
+  NEWHTTPDCOMPAT="${NEWHTTPDNEW}"
+  NEWMODFPCOMAPT="${NEWMODFPNEW}"
+  DEFAULTHTTPD="PREFIX/sbin/httpd"
 
 case "`echo 'x\c'`" in
    'x\c')   echo="echo -n"    nnl= ;;      #BSD
@@ -60,6 +62,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" ;;
@@ -214,6 +219,20 @@
 
  clear
 
+ if ($strings $httpdfile | $fgrep "etc/apache/httpd.conf" > /dev/null)
+ then
+    NEWHTTPD=$NEWHTTPDNEW
+    NEWMODFP=$NEWMODFPNEW
+    echo "Selected server uses FreeBSD directory structure:"
+
+    targetVersionNumber=`$httpdfile -v | sed 's%^.*Apache/\([0-9\.]*\).*%\1%' | head -1`
+    targetFPVersionNumber=`$strings \`dirname \\\`dirname $httpdfile\\\`\`/libexec/apache/mod_frontpage.so | \
+	$fgrep "FrontPage/" 2> /dev/null | sed -e 's%^.*FrontPage/\([0-9\.]*\).*%\1%' | tail -1`
+
+    sourceVersionNumber=`$NEWHTTPD -v | sed 's%^.*Apache/\([0-9\.]*\).*%\1%' | head -1`
+    sourceFPVersionNumber=`$strings $NEWMODFP | $fgrep "FrontPage/" 2> /dev/null | \
+	 sed -e 's%^.*FrontPage/\([0-9\.]*\).*%\1%' | tail -1`
+ else
 
  if ($strings $httpdfile | $fgrep "etc/httpd.conf" > /dev/null)
  then
@@ -232,7 +251,8 @@
  sourceVersionNumber=`$NEWHTTPD -v | sed 's%^.*Apache/\([0-9\.]*\).*%\1%' | head -1`
  sourceFPVersionNumber=`$strings $NEWHTTPD | $fgrep "FrontPage/" 2> /dev/null | sed -e '
                               s%^.*FrontPage/\([0-9\.]*\).*%\1%' | tail -1`
-            
+ fi
+
  echo
  echo "Currently running Apache/${targetVersionNumber} FrontPage/${nnl}" 
  if [ "${targetFPVersionNumber}" = "" ]
@@ -496,10 +516,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" ]
@@ -1061,10 +1090,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
@@ -1081,10 +1119,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
@@ -1108,10 +1155,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" ]
@@ -1253,6 +1309,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()