diff options
author | Francois Pons <fpons@mandriva.com> | 2000-04-06 14:07:25 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-04-06 14:07:25 +0000 |
commit | 658f028abc50486955e99d7083cdff8e07088e6f (patch) | |
tree | 7c999fb7c9a77df0805fbf3268fdd5e3351894df /perl-install | |
parent | 363aab7a71a0b505c780b763b22bcd5131995382 (diff) | |
download | drakx-658f028abc50486955e99d7083cdff8e07088e6f.tar drakx-658f028abc50486955e99d7083cdff8e07088e6f.tar.gz drakx-658f028abc50486955e99d7083cdff8e07088e6f.tar.bz2 drakx-658f028abc50486955e99d7083cdff8e07088e6f.tar.xz drakx-658f028abc50486955e99d7083cdff8e07088e6f.zip |
*** empty log message ***
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/ChangeLog | 5 | ||||
-rw-r--r-- | perl-install/install2.pm | 5 | ||||
-rw-r--r-- | perl-install/install_any.pm | 1 | ||||
-rw-r--r-- | perl-install/install_steps.pm | 16 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 2 |
5 files changed, 17 insertions, 12 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog index c22e8aa36..5ec2486c4 100644 --- a/perl-install/ChangeLog +++ b/perl-install/ChangeLog @@ -1,3 +1,8 @@ +2000-04-06 François Pons <fpons@mandrakesoft.com> + + * install_steps_interactive.pm, install_steps.pm: added support + for peerdns options of ppp, so removed dns address unless expert. + 2000-04-05 François Pons <fpons@mandrakesoft.com> * crypto.pm, install_steps_interactive.pm, install2.pm, diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 60b0ca166..d99fd741d 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -370,7 +370,7 @@ sub doInstallStep { } #------------------------------------------------------------------------------ sub miscellaneous { - $o->miscellaneous($_[0]); + $o->miscellaneous($_[0]); addToBeDone { setVarsInSh("$o->{prefix}/etc/sysconfig/system", { @@ -402,7 +402,7 @@ sub configureNetwork { add2hash($o->{netc}, network::read_conf("$o->{prefix}/etc/sysconfig/network")) if -r "$o->{prefix}/etc/sysconfig/network"; add2hash($o->{netc}, network::read_resolv_conf("$o->{prefix}/etc/resolv.conf")) if -r "$o->{prefix}/etc/resolv.conf"; foreach (all("$o->{prefix}/etc/sysconfig/network-scripts")) { - if (/ifcfg-(\w+)/) { + if (/ifcfg-(\w+)/ && $1 !~ /^ppp/) { push @{$o->{intf}}, { getVarsFromSh("$o->{prefix}/etc/sysconfig/network-scripts/$_") }; } } @@ -624,6 +624,7 @@ sub main { } $::o = $o = $o_; + #- get stage1 network configuration if any. $o->{netc} = network::read_conf("/tmp/network"); if (my ($file) = glob_('/tmp/ifcfg-*')) { log::l("found network config file $file"); diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index fe6689659..67edf08b0 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -242,6 +242,7 @@ sub setPackages($) { my @l = (); push @l, "kapm" if $o->{pcmcia}; require timezone; + require lang; push @l, "isdn4k-utils" if ($o->{timezone}{timezone} || timezone::bestTimezone(lang::lang2text($o->{lang}))) =~ /Europe/; $_->{values} = [ map { $_ + 50 } @{$_->{values}} ] foreach grep {$_} map { $o->{packages}{$_} } @l; diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index fc60af16e..df669f465 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -392,11 +392,14 @@ sub pppConfig { install_any::pkg_install($o, "ppp"); my %toreplace; - $toreplace{$_} = $o->{modem}{$_} foreach qw(connection phone login passwd auth domain); - $toreplace{kpppauth} = ${{ 'Script-based' => 0, PAP => 1, 'Terminal-based' => 2, CHAP => 3, }}{$o->{modem}{auth}}; #' - $toreplace{phone} =~ s/[^\d]//g; + $toreplace{$_} = $o->{modem}{$_} foreach qw(connection phone login passwd auth domain dns1 dns2); + $toreplace{kpppauth} = ${{ 'Script-based' => 0, 'PAP' => 1, 'Terminal-based' => 2, 'CHAP' => 3, }}{$o->{modem}{auth}}; + $toreplace{phone} =~ s/\D//g; $toreplace{dnsserver} = join '', map { "$o->{modem}{$_}," } "dns1", "dns2"; + #- using peerdns or dns1,dns2 avoid writing a /etc/resolv.conf file. + $toreplace{peerdns} = "yes"; + $toreplace{connection} ||= 'DialupConnection'; $toreplace{domain} ||= 'localdomain'; $toreplace{intf} ||= 'ppp0'; @@ -421,13 +424,6 @@ sub pppConfig { template2file("/usr/share/chat-ppp.script.in", "$o->{prefix}/etc/sysconfig/network-scripts/chat-ppp0", %toreplace); } #- no CHAP currently. - #- build /etc/resolv.conf according to ppp configuration since there is no other network configuration. - open F, ">$o->{prefix}/etc/resolv.conf" or die "Can't open $o->{prefix}/etc/resolv.conf $!"; - print F "domain $o->{modem}{domain}\n"; - print F "nameserver $o->{modem}{dns1}\n" if $o->{modem}{dns1}; - print F "nameserver $o->{modem}{dns2}\n" if $o->{modem}{dns2}; - close F; - install_any::template2userfile($o->{prefix}, "$ENV{SHARE_PATH}/kppprc.in", ".kde/share/config/kppprc", 1, %toreplace); miscellaneousNetwork($o); diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 746f4ac66..052dbf312 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -502,8 +502,10 @@ _("Login ID") => \$m->{login}, _("Password") => { val => \$m->{passwd}, hidden => 1 }, _("Authentication") => { val => \$m->{auth}, list => [ __("PAP"), __("CHAP"), __("Terminal-based"), __("Script-based") ] }, _("Domain name") => \$m->{domain}, +$::expert ? ( _("First DNS Server") => \$m->{dns1}, _("Second DNS Server") => \$m->{dns2}, +) : (), ]); } |