summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-10-27 17:31:03 +0000
committerjkh <jkh@FreeBSD.org>1995-10-27 17:31:03 +0000
commitda3af90de4dffab8739db99e84e860d41c2102d0 (patch)
tree99571f638e5044417711be050ae20017467f116d /release
parente86ff82ea3ef1ca3056f4dec3083331a727abca3 (diff)
downloadFreeBSD-src-da3af90de4dffab8739db99e84e860d41c2102d0.zip
FreeBSD-src-da3af90de4dffab8739db99e84e860d41c2102d0.tar.gz
Some last few tweaks - now the sample home page comes up properly by
default.
Diffstat (limited to 'release')
-rw-r--r--release/sysinstall/apache.c44
1 files changed, 17 insertions, 27 deletions
diff --git a/release/sysinstall/apache.c b/release/sysinstall/apache.c
index 4fc44ef..03fa9ea 100644
--- a/release/sysinstall/apache.c
+++ b/release/sysinstall/apache.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: apache.c,v 1.6 1995/10/27 02:12:38 jkh Exp $
+ * $Id: apache.c,v 1.7 1995/10/27 05:16:46 jkh Exp $
*
* Copyright (c) 1995
* Coranth Gryphon. All rights reserved.
@@ -234,7 +234,7 @@ apacheOpenDialog()
strcpy(tconf.userdir, "public_html");
strcpy(tconf.readme, "README");
strcpy(tconf.maxcon, "150");
- sprintf(tconf.docroot, "%s/data", APACHE_BASE);
+ sprintf(tconf.docroot, "%s/htdocs", APACHE_BASE);
/* Loop over the layout list, create the objects, and add them
onto the chain of objects that dialog uses for traversal*/
@@ -390,7 +390,7 @@ int
installApache(char *unused)
{
int i,maxcon;
- char company[64], file[128], cmd[256];
+ char company[64], file[128];
char *tptr;
FILE *fptr;
@@ -431,29 +431,26 @@ installApache(char *unused)
if (tconf.docroot[strlen(tconf.docroot)-1] == '/')
tconf.docroot[strlen(tconf.docroot)-1] = '\0';
- if (! tconf.docroot[0])
+ if (!tconf.docroot[0])
sprintf(tconf.docroot,"%s/data",APACHE_BASE);
/*** If DocRoot does not exist, create it ***/
- if (! directoryExists(tconf.docroot))
- {
- sprintf(cmd,"mkdir -p %s",tconf.docroot);
- system(cmd);
- }
+ if (!directoryExists(tconf.docroot))
+ vsystem("mkdir -p %s", tconf.docroot);
if (directoryExists(tconf.docroot))
{
- sprintf(file,"%s/welcome.html",tconf.docroot);
- if (! file_readable(file))
+ sprintf(file,"%s/index.html", tconf.docroot);
+ if (!file_readable(file))
{
dialog_clear();
tptr = msgGetInput(NULL,
"What is your company name?");
if (tptr && strlen(tptr))
- strcpy(company,tptr);
+ strcpy(company, tptr);
else
- strcpy(company,"our Web Page");
+ strcpy(company, "our Web Page");
msgNotify("Creating sample web page...");
fptr = fopen(file,"w");
@@ -473,9 +470,9 @@ installApache(char *unused)
if (tconf.email[0])
{
fprintf(fptr,"<ADDRESS><H4>\n");
- fprintf(fptr," For questions or comments, send mail to:\n");
+ fprintf(fptr," For questions or comments, please send mail to:\n");
fprintf(fptr," <A HREF=\"mailto:%s\">%s</A>\n",
- tconf.email,tconf.email);
+ tconf.email, tconf.email);
fprintf(fptr,"</H4></ADDRESS>\n");
}
fprintf(fptr,"</CENTER>\n\n");
@@ -497,10 +494,8 @@ installApache(char *unused)
(void)vsystem("mkdir -p %s/config", APACHE_BASE);
sprintf(file, "%s/config/access.conf", APACHE_BASE);
if (file_readable(file))
- {
- sprintf(cmd,"mv -f %s %s.ORIG", file, file);
- system(cmd);
- }
+ vsystem("mv -f %s %s.ORIG", file, file);
+
fptr = fopen(file,"w");
if (fptr)
{
@@ -516,10 +511,8 @@ installApache(char *unused)
sprintf(file, "%s/config/httpd.conf", APACHE_BASE);
if (file_readable(file))
- {
- sprintf(cmd,"mv -f %s %s.ORIG", file, file);
- system(cmd);
- }
+ vsystem("mv -f %s %s.ORIG", file, file);
+
fptr = fopen(file,"w");
if (fptr)
{
@@ -542,10 +535,7 @@ installApache(char *unused)
sprintf(file, "%s/config/srm.conf", APACHE_BASE);
if (file_readable(file))
- {
- sprintf(cmd,"mv -f %s %s.ORIG", file, file);
- system(cmd);
- }
+ vsystem("mv -f %s %s.ORIG", file, file);
fptr = fopen(file,"w");
if (fptr)
{
OpenPOWER on IntegriCloud