summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2005-06-30 01:12:46 +0000
committerAntoine Ginies <aginies@mandriva.com>2005-06-30 01:12:46 +0000
commitea7a4b844ae017ba72ae087e51f7cd6dcf277018 (patch)
treebe8c5281e173fb154d0486303bf561cd000551ef
parenta152f76167d0a9b3dada2f8907946489f2fbb6de (diff)
downloaddrakwizard-ea7a4b844ae017ba72ae087e51f7cd6dcf277018.tar
drakwizard-ea7a4b844ae017ba72ae087e51f7cd6dcf277018.tar.gz
drakwizard-ea7a4b844ae017ba72ae087e51f7cd6dcf277018.tar.bz2
drakwizard-ea7a4b844ae017ba72ae087e51f7cd6dcf277018.tar.xz
drakwizard-ea7a4b844ae017ba72ae087e51f7cd6dcf277018.zip
indent change
-rwxr-xr-xweb_wizard/Apache.pm85
1 files changed, 39 insertions, 46 deletions
diff --git a/web_wizard/Apache.pm b/web_wizard/Apache.pm
index 6ff0f63c..e43af1d6 100755
--- a/web_wizard/Apache.pm
+++ b/web_wizard/Apache.pm
@@ -2,7 +2,7 @@
# Drakwizard
-# Copyright (C) 2002, 2003 Mandrakesoft
+# Copyright (C) 2002, 2005 Mandrakesoft
#
# Authors: Arnaud Desmons <adesmons@mandrakesoft.com>
# Florent Villard <warly@mandrakesoft.com>
@@ -36,35 +36,34 @@ my $root;
my $config;
my $o = {
- name => N("Web wizard"),
- var => {
- web_internal => '',
- web_external => '',
- user_mod => '',
- user_dir => '',
- shared_dir => ''
- },
- needed_rpm => [ 'apache-mpm-prefork' ],
- defaultimage => "/usr/share/wizards/web_wizard/images/apache.png",
- init => sub {
- if (-f $file) {
- open my $FH, $file or die "$! ($file)";
- local $_;
- while (<$FH>) {
- if (/^\s*#?\s*DocumentRoot\s+(.*)/) {
- close($FH);
- $root = $1;
- last;
- }
- }
- close($FH);
- } else {
- return 0, N("%s does not exist.", $file)
- }
- 1
-}
-
-};
+ name => N("Web wizard"),
+ var => {
+ web_internal => '',
+ web_external => '',
+ user_mod => '',
+ user_dir => '',
+ shared_dir => ''
+ },
+ needed_rpm => [ 'apache-mpm-prefork' ],
+ defaultimage => "/usr/share/wizards/web_wizard/images/apache.png",
+ init => sub {
+ if (-f $file) {
+ open my $FH, $file or die "$! ($file)";
+ local $_;
+ while (<$FH>) {
+ if (/^\s*#?\s*DocumentRoot\s+(.*)/) {
+ close($FH);
+ $root = $1;
+ last;
+ }
+ }
+ close($FH);
+ } else {
+ return 0, N("%s does not exist.", $file)
+ }
+ 1
+ }
+ };
$o->{pages} = {
@@ -72,7 +71,7 @@ $o->{pages} = {
name => N("Web server configuration wizard") . "\n\n" . N("This wizard will help you configuring the Web server for your network."),
post => sub { $wiz->check_dhcp },
no_back => 1,
- next => 'config'
+ next => 'config',
},
config => {
name => N("Web server") . "\n\n" . N("Your server can act as a Web server toward your internal network (intranet) and as a Web server for the Internet.") . "\n\n" . N("Select the kind of Web service you want to activate:") . "\n\n" . N("Don't check any box if you don't want to activate your Web server."),
@@ -80,22 +79,21 @@ $o->{pages} = {
{ text => N("Enable the Web server for the intranet"), type => 'bool', val => \$o->{var}{web_internal} },
{ text => N("Enable the Web server for the Internet"), type => 'bool', val => \$o->{var}{web_external} },
],
- next => 'ask_mod'
+ next => 'ask_mod',
},
dhcp_warning => {
name => N("Warning.") . "\n\n" . N("You are in dhcp, server may not work with your configuration."),
ignore => 1,
- next => 'config'
+ next => 'config',
},
ask_mod => {
name => N("Modules:") . "\n\n" . N("* User module: allows users to have a directory in their home directories available on your http server via http://www.yourserver.com/~user, you will be asked for the name of this directory afterward."),
pre => sub { $o->{var}{user_mod} = is_last_user_mod() },
data => [
- { text => join("\n", warp_text(N("Allows users to get a directory in their home directories
-available on your http server via http://www.yourserver.com/~user."), 70)), type => 'bool', val => \$o->{var}{user_mod} },
+ { text => join("\n", warp_text(N("Allows users to get a directory in their home directories available on your http server via http://www.yourserver.com/~user."), 70)), type => 'bool', val => \$o->{var}{user_mod} },
],
post => sub { return 'user_dir' if $o->{var}{user_mod} },
- next => 'ask_dir'
+ next => 'ask_dir',
},
user_dir => {
name => N("Type the name of the directory users should create in their homes (without ~/) to get it available via http://www.yourserver.com/~user"),
@@ -103,7 +101,7 @@ available on your http server via http://www.yourserver.com/~user."), 70)), type
data => [
{ label => N("user http sub-directory: ~/"), help => N("Type the name of the directory users should create in their homes (without ~/) to get it available via http://www.yourserver.com/~user"), val => \$o->{var}{user_dir} },
],
- next => 'ask_dir'
+ next => 'ask_dir',
},
ask_dir => {
name => N("Type the path of the directory you want being the document root."),
@@ -116,7 +114,7 @@ available on your http server via http://www.yourserver.com/~user."), 70)), type
$::in->ask_warn(N('Error'), N('The path you entered does not exist.')); return 1; }
else { return 0; };
},
- next => 'summary'
+ next => 'summary',
},
summary => {
name => N("Configuring the Web server") . "\n\n" . N("The wizard collected the following parameters needed to configure your Web server") . "\n\n" . N("To accept these values, and configure your server, click the Next button or use the Back button to correct them."),
@@ -131,13 +129,12 @@ available on your http server via http://www.yourserver.com/~user."), 70)), type
{ label => N("User directory:"), fixed_val => \$o->{var}{user_dir} },
],
post => \&do_it,
- next => 'end'
+ next => 'end',
},
end => {
- name => N("Congratulations") . "\n\n" .
- N("The wizard successfully configured your intranet/Internet Web server"),
+ name => N("Congratulations") . "\n\n" . N("The wizard successfully configured your intranet/Internet Web server"),
end => 1,
- next => 0
+ next => 0,
},
error_end => {
name => N("Failed"),
@@ -165,10 +162,6 @@ sub new {
}, $class;
}
-sub check_dir {
-
-}
-
sub chg_docroot {
my $old;
substInFile {