summaryrefslogtreecommitdiff
path: root/www/apache13-fp/files/patch-fb
blob: 5e86d31a17215eecc6157ee39a4fcf8d3f3b3e89 (plain) (blame)
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
--- frontpage/version4.0/fp_install.sh.orig	Mon May 24 12:45:14 1999
+++ frontpage/version4.0/fp_install.sh	Sat Jun 12 13:56:45 1999
@@ -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" ;;
@@ -327,7 +330,7 @@
  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}" 
+ $echo "FrontPage Extensions directory [${INSTALLDIRDEFAULT}]:  ${nnl}" 
  read installdir
  
  if [ "$installdir" = "" ]
@@ -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()