summaryrefslogtreecommitdiffstats
path: root/web_wizard
diff options
context:
space:
mode:
authorArnaud Desmons <adesmons@mandriva.com>2002-10-15 16:10:00 +0000
committerArnaud Desmons <adesmons@mandriva.com>2002-10-15 16:10:00 +0000
commit83eca6fa0dac3c5dbf68aff23d87ff5fca2e5a5c (patch)
tree4c26d86f98f9c21e47cc27df98ab8ef90e280455 /web_wizard
parent7c9035918b08c4f2e6960a9664dbdd4e40e45c6a (diff)
downloaddrakwizard-83eca6fa0dac3c5dbf68aff23d87ff5fca2e5a5c.tar
drakwizard-83eca6fa0dac3c5dbf68aff23d87ff5fca2e5a5c.tar.gz
drakwizard-83eca6fa0dac3c5dbf68aff23d87ff5fca2e5a5c.tar.bz2
drakwizard-83eca6fa0dac3c5dbf68aff23d87ff5fca2e5a5c.tar.xz
drakwizard-83eca6fa0dac3c5dbf68aff23d87ff5fca2e5a5c.zip
wiz update, nfs fixed
Diffstat (limited to 'web_wizard')
-rw-r--r--web_wizard/scripts/Webconf.pm32
-rw-r--r--web_wizard/web.wiz14
2 files changed, 32 insertions, 14 deletions
diff --git a/web_wizard/scripts/Webconf.pm b/web_wizard/scripts/Webconf.pm
index 4ea60b7d..fa815aee 100644
--- a/web_wizard/scripts/Webconf.pm
+++ b/web_wizard/scripts/Webconf.pm
@@ -46,27 +46,40 @@ sub chg_docroot {
}
sub is_user_mod {
- $ENV{wiz_user_mod};
+ if ($ENV{wiz_user_mod}) {
+ return 1;
+ }
+ $ENV{wiz_user_dir} = "disabled";
+ 0;
+}
+
+sub is_last_user_mod {
+ my $root = get_user_dir();
+ chomp($root);
+ !($root eq 'disabled');
}
sub get_user_dir {
- my %conf = Varspaceval->get("/etc/httpd/conf/commonhttpd.conf");
+ my %conf = Varspaceval->get("/etc/httpd/conf/commonhttpd.conf");
$conf{UserDir};
}
sub chg_user_dir {
my $root = get_user_dir();
- substInFile {
- s|(\s*)UserDir\s*$root(/?)|$1UserDir $ENV{wiz_user_dir}$2|g;
- } "/etc/httpd/conf/commonhttpd.conf";
- if ($ENV{wiz_user_dir} !~ /\s*disabled\s*/) {
- substInFile {
+ if ($ENV{wiz_user_mod}) {
+ substInFile {
s|(/home/\*/)$root(/?)|$1$ENV{wiz_user_dir}$2|g;
- } "/etc/httpd/conf/httpd.conf";
+ } "/etc/httpd/conf/commonhttpd.conf";
substInFile {
+ s|(\s*)UserDir\s*$root(/?)|$1UserDir $ENV{wiz_user_dir}$2|g;
s|(/home/\*/)$root(/?)|$1$ENV{wiz_user_dir}$2|g;
} "/etc/httpd/conf/commonhttpd.conf";
}
+ else {
+ substInFile {
+ s|(\s*)UserDir\s*$root(/?)|$1UserDir disabled$2|g;
+ } "/etc/httpd/conf/commonhttpd.conf";
+ }
10;
}
@@ -87,7 +100,8 @@ sub do_it {
{ s /^\s*Allow .*$/ Allow from $that\n/s;}
;}
} $file;
-# chg_docroot();
+ chg_docroot();
+ chg_user_dir();
system("/etc/rc.d/init.d/httpd restart");
10;
}
diff --git a/web_wizard/web.wiz b/web_wizard/web.wiz
index 8cb8880c..1ac60e6a 100644
--- a/web_wizard/web.wiz
+++ b/web_wizard/web.wiz
@@ -9,17 +9,20 @@
defaultImage="__WIZ_HOME__/web_wizard/images/apache"
perlModule="__WIZ_HOME__/web_wizard/scripts/Webconf.pm"
rpm="apache"
+ summaryFunc="do_it"
>
<Variable
name="wiz_web_internal"
shellVariable="wiz_web_internal"
+ defaultValue="1"
>
</Variable>
<Variable
name="wiz_web_external"
shellVariable="wiz_web_external"
+ defaultValue="1"
>
</Variable>
@@ -203,9 +206,9 @@
<Boolean
variableName="user_mod"
- forceEnabled="1"
- forceDisabled="0"
helpText="activate user module"
+ fillfunc="is_last_user_mod"
+ help="Allows users to get a directory in theirs homes directories available on your http server via http://www.yourserver.com/~user."
>
</Boolean>
</Page>
@@ -213,6 +216,8 @@
<Page
helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
name="ask_user_dir"
+ func="check_dir"
+ is="user_mod"
executionLevel="NORMAL"
nextFinish="false"
canBack="true"
@@ -229,6 +234,7 @@
helpText="user http sub-directory : ~/"
editable="true"
fillfunc="get_user_dir"
+ help="Type the name of the directory users should create in theirs homes (whitout ~/) to get it available via http://www.yourserver.com/~user"
>
</Freetext>
</Page>
@@ -270,7 +276,6 @@
</Freetext>
</Page>
-
<Page
helpURL="file:/usr/share/doc/mandrake/${LANG}/ref.html/wiz-samba.html"
name="error_in_dir"
@@ -309,8 +314,7 @@
<Info
- helpText="The wizard collected the following parameters
-needed to configure your Web Server"
+ helpText="The wizard collected the following parameters needed to configure your Web Server"
>
</Info>