summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone')
-rw-r--r--perl-install/standalone/drakvpn53
1 files changed, 22 insertions, 31 deletions
diff --git a/perl-install/standalone/drakvpn b/perl-install/standalone/drakvpn
index 67dceaaa5..452b07abd 100644
--- a/perl-install/standalone/drakvpn
+++ b/perl-install/standalone/drakvpn
@@ -842,25 +842,12 @@ network::ipsec::add_section_racoon_conf($proposal_remote_section, $racoon);
5 => [ 'authentication_algorithm', 'hmac_sha1' ],
6 => [ 'compression_algorithm', 'deflate' ],
};
- $in->ask_from('',
+ ask_info('',
N("Make sure you already have the path sections
on the top of your %s file.\n
You can now choose the sainfo settings.
-Choose continue or previous when you are done.\n", $racoon_conf),
- [ { label => N("sainfo_source_address"), val => \$sainfo_section->{1}[2], type => 'entry' },
- { label => N("sainfo_source_proto"), val => \$sainfo_section->{1}[3], type => 'entry' },
- { label => N("sainfo_dest_address"), val => \$sainfo_section->{1}[5], type => 'entry' },
- { label => N("sainfo_dest_proto"), val => \$sainfo_section->{1}[6], type => 'entry' },
- { label => N("PFS group"), val => \$sainfo_section->{2}[1],
- list => [ qw(modp768 modp1024 modp1536) ], },
- { label => N("Lifetime number"), val => \$sainfo_section->{3}[2], type => 'entry' },
- { label => N("Lifetime unit"), val => \$sainfo_section->{3}[3], type => 'entry' },
- { label => N("Encryption algorithm"), val => \$sainfo_section->{4}[1], type => 'entry' },
- { label => N("Authentication algorithm"), val => \$sainfo_section->{5}[1], type => 'entry' },
- { label => N("Compression algorithm"), val => \$sainfo_section->{6}[1], type => 'entry' },
- ]
-) or goto step_configure_racoon_conf;
+Choose continue or previous when you are done.\n", $racoon_conf), $sainfo_section) or goto step_configure_racoon_conf;
network::ipsec::add_section_racoon_conf($sainfo_section, $racoon);
}
@@ -907,26 +894,12 @@ Choose continue when you are done to write the data.\n", $racoon_conf),
) or goto step_configure_racoon_conf;
} elsif ($choice =~ /^sainfo/) {
- $in->ask_from('',
+ ask_info('',
N("Your %s file has several sctions.
You can now edit the sainfo section entries.
-Choose continue when you are done to write the data.\n", $racoon_conf),
- [ { label => N("sainfo_source_address"), val => \$racoon->{$number}{1}[2], type => 'entry' },
- { label => N("sainfo_source_proto"), val => \$racoon->{$number}{1}[3], type => 'entry' },
- { label => N("sainfo_dest_address"), val => \$racoon->{$number}{1}[5], type => 'entry' },
- { label => N("sainfo_dest_proto"), val => \$racoon->{$number}{1}[6], type => 'entry' },
- { label => N("PFS group"), val => \$racoon->{$number}{2}[1],
- list => [ qw(modp768 modp1024 modp1536) ], },
- { label => N("Lifetime number"), val => \$racoon->{$number}{3}[2], type => 'entry' },
- { label => N("Lifetime unit"), val => \$racoon->{$number}{3}[3], type => 'entry' },
- { label => N("Encryption algorithm"), val => \$racoon->{$number}{4}[1], type => 'entry' },
- { label => N("Authentication algorithm"), val => \$racoon->{$number}{5}[1], type => 'entry' },
- { label => N("Compression algorithm"), val => \$racoon->{$number}{6}[1], type => 'entry' },
- ]
-
-) or goto step_configure_racoon_conf;
+Choose continue when you are done to write the data.\n", $racoon_conf), $racoon->{$number}) or goto step_configure_racoon_conf;
} elsif ($choice =~ /^path/) {
$in->ask_from('',
@@ -993,3 +966,21 @@ sub quit_global {
$in->exit($exitcode);
goto begin
}
+
+
+sub ask_info {
+ my ($title, $text, $data) = @_;
+ $in->ask_from($title, $text,
+ [ { label => N("sainfo_source_address"), val => \$data->{1}[2], type => 'entry' },
+ { label => N("sainfo_source_proto"), val => \$data->{1}[3], type => 'entry' },
+ { label => N("sainfo_dest_address"), val => \$data->{1}[5], type => 'entry' },
+ { label => N("sainfo_dest_proto"), val => \$data->{1}[6], type => 'entry' },
+ { label => N("PFS group"), val => \$data->{2}[1],
+ list => [ qw(modp768 modp1024 modp1536) ], },
+ { label => N("Lifetime number"), val => \$data->{3}[2], type => 'entry' },
+ { label => N("Lifetime unit"), val => \$data->{3}[3], type => 'entry' },
+ { label => N("Encryption algorithm"), val => \$data->{4}[1], type => 'entry' },
+ { label => N("Authentication algorithm"), val => \$data->{5}[1], type => 'entry' },
+ { label => N("Compression algorithm"), val => \$data->{6}[1], type => 'entry' },
+ ]);
+}