From 9e0caae9c6a32cba46c827c9106f2250b7bf98dc Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 23 Jul 2004 12:29:12 +0000 Subject: - introduce ONBOOT and DIAL_ON_BOOT settings for isdn connections - write this settings with configureNetwork2, kill the old tweak in isdn.pm - use the isdn_dial_on_boot step instead of nework_on_boot in netconnect.pm --- perl-install/network/netconnect.pm | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'perl-install/network/netconnect.pm') diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 7dde76ea3..bdca6f0f7 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -84,7 +84,7 @@ sub real_main { my ($modem, $modem_name, $modem_conf_read, $modem_dyn_dns, $modem_dyn_ip); my ($adsl_type, @adsl_devices, $adsl_failed, $adsl_answer, %adsl_data, $adsl_data, $adsl_provider, $adsl_old_provider); my ($ntf_name, $ipadr, $netadr, $gateway_ex, $up, $need_restart_network); - my ($isdn, $isdn_name, $isdn_type, %isdn_cards); + my ($isdn, $isdn_name, $isdn_type, %isdn_cards, @isdn_dial_methods); my $my_isdn = join('', N("Manual choice"), " (", N("Internal ISDN card"), ")"); my ($module, $auto_ip, $protocol, $onboot, $needhostname, $hotplug, $track_network_id, @fields); # lan config my $success = 1; @@ -199,6 +199,7 @@ sub real_main { my $goto_start_on_boot_ifneeded = sub { return $after_start_on_boot_step->() if $netcnx->{type} =~ /lan|cable/; + return "isdn_dial_on_boot" if $netcnx->{type} =~ /isdn/; return "network_on_boot"; }; @@ -1174,6 +1175,34 @@ It is not necessary on most networks."), }, }, + isdn_dial_on_boot => + { + pre => sub { + $intf->{ippp0} ||= { DEVICE => "ippp0" }; # we want the ifcfg-ippp0 file to be written + @isdn_dial_methods = ({ name => N("Automatically at boot"), + ONBOOT => 1, DIAL_ON_BOOT => 1 }, + { name => N("By using Net Applet in the system tray"), + ONBOOT => 0, DIAL_ON_BOOT => 1 }, + { name => N("Manually (the interface would still be activated at boot)"), + ONBOOT => 1, DIAL_ON_BOOT => 0 }); + my $method = find { + $_->{ONBOOT} eq text2bool($intf->{ippp0}{ONBOOT}) and + $_->{DIAL_ON_BOOT} eq text2bool($intf->{ippp0}{DIAL_ON_BOOT}) + } @isdn_dial_methods; + #- use net_applet by default + $isdn->{dial_method} = $method->{name} || $isdn_dial_methods[1]->{name}; + }, + name => N("How do you to dial this connection ?"), + data => sub { + [ { type => "list", val => \$isdn->{dial_method}, list => [ map { $_->{name} } @isdn_dial_methods ] } ] + }, + post => sub { + my $method = find { $_->{name} eq $isdn->{dial_method} } @isdn_dial_methods; + $intf->{ippp0}{$_} = bool2yesno($method->{$_}) foreach qw(ONBOOT DIAL_ON_BOOT); + return $after_start_on_boot_step->(); + }, + }, + restart => { name => N("The network needs to be restarted. Do you want to restart it ?"), -- cgit v1.2.1