diff options
author | Francois Pons <fpons@mandriva.com> | 1999-11-09 11:49:42 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 1999-11-09 11:49:42 +0000 |
commit | 844cead8bad8e2e4d7619abd39cf0351f9b97bc6 (patch) | |
tree | 153f8ac4b13f174a5b02dcb7d8bd36e6a5dcad8b | |
parent | 950fe7395621dc21885ac3e1280e007248646608 (diff) | |
download | drakx-backup-do-not-use-844cead8bad8e2e4d7619abd39cf0351f9b97bc6.tar drakx-backup-do-not-use-844cead8bad8e2e4d7619abd39cf0351f9b97bc6.tar.gz drakx-backup-do-not-use-844cead8bad8e2e4d7619abd39cf0351f9b97bc6.tar.bz2 drakx-backup-do-not-use-844cead8bad8e2e4d7619abd39cf0351f9b97bc6.tar.xz drakx-backup-do-not-use-844cead8bad8e2e4d7619abd39cf0351f9b97bc6.zip |
*** empty log message ***
-rw-r--r-- | perl-install/Makefile | 2 | ||||
-rw-r--r-- | perl-install/install2.pm | 22 | ||||
-rw-r--r-- | perl-install/install_steps.pm | 39 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 14 |
4 files changed, 56 insertions, 21 deletions
diff --git a/perl-install/Makefile b/perl-install/Makefile index c09cf9f16..554a82a82 100644 --- a/perl-install/Makefile +++ b/perl-install/Makefile @@ -139,7 +139,7 @@ get_needed_files: $(DIRS) cp -a keymaps $(DEST)/usr/share cp -a consolefonts $(DEST)/usr/share - cp kppprc.in modparm.lst MonitorsDB $(DEST)/usr/share + cp ifcfg-ppp.* chat-ppp.* kppprc.in modparm.lst MonitorsDB $(DEST)/usr/share cp logo-mandrake.xpm $(DEST)/usr/share cp -a themes $(DEST)/usr/share/gtk cp compss compssUsers compssList $(ROOTDEST)/Mandrake/base diff --git a/perl-install/install2.pm b/perl-install/install2.pm index b22783ff2..d429802e1 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -161,17 +161,17 @@ $o = $::o = { REMOTEHOST => "", REMOTEQUEUE => "", - NCPHOST => "printerservername", - NCPQUEUE => "queuename", - NCPUSER => "user", - NCPPASSWD => "pass", - - SMBHOST => "hostname", - SMBHOSTIP => "1.2.3.4", - SMBSHARE => "printername", - SMBUSER => "user", - SMBPASSWD => "passowrd", - SMBWORKGROUP => "AS3", + NCPHOST => "", #-"printerservername", + NCPQUEUE => "", #-"queuename", + NCPUSER => "", #-"user", + NCPPASSWD => "", #-"pass", + + SMBHOST => "", #-"hostname", + SMBHOSTIP => "", #-"1.2.3.4", + SMBSHARE => "", #-"printername", + SMBUSER => "", #-"user", + SMBPASSWD => "", #-"passowrd", + SMBWORKGROUP => "", #-"AS3", }, #- superuser => { password => 'a', shell => '/bin/bash', realname => 'God' }, #- user => { name => 'foo', password => 'bar', home => '/home/foo', shell => '/bin/bash', realname => 'really, it is foo' }, diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index b537263f7..505dbae6b 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -252,14 +252,46 @@ sub pppConfig { my ($o) = @_; $o->{modem} or return; - symlinkf($o->{modem}{device}, "$o->{prefix}/dev/modem"); + symlinkf($o->{modem}{device}, "$o->{prefix}/dev/modem") or log::l("creation of $o->{prefix}/dev/modem failed"); 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{dnsserver} = join '', map { "$o->{modem}{$_}," } "dns1", "dns2"; - + + $toreplace{connection} ||= 'DialupConnection'; + $toreplace{domain} ||= 'localdomain'; + $toreplace{intf} ||= 'ppp0'; + + if ($o->{modem}{auth} eq 'PAP') { + template2file("/usr/share/ifcfg-ppp.pap.in", "$o->{prefix}/etc/sysconfig/network-scripts/ifcfg-ppp0", %toreplace); + template2file("/usr/share/chat-ppp.pap.in", "$o->{prefix}/etc/sysconfig/network-scripts/chat-ppp0", %toreplace); + + my @l = cat_("$o->{prefix}/etc/ppp/pap-secrets"); + my $replaced = 0; + do { $replaced ||= 1 + if s/^\s*$toreplace{connection}\s+ppp0\s+(\S+)/$toreplace{connection} ppp0 $toreplace{passwd}/; } foreach @l; + if ($replaced) { + open F, ">$o->{prefix}/etc/ppp/pap-secrets" or die "Can't open $o->{prefix}/etc/ppp/pap-secrets $!"; + print F @l; + } else { + open F, ">>$o->{prefix}/etc/ppp/pap-secrets" or die "Can't open $o->{prefix}/etc/ppp/pap-secrets $!"; + print F "$toreplace{connection} ppp0 $toreplace{passwd}\n"; + } + } elsif ($o->{modem}{auth} eq 'Terminal-based' || $o->{modem}{auth} eq 'Script-based') { + template2file("/usr/share/ifcfg-ppp.script.in", "$o->{prefix}/etc/sysconfig/network-scripts/ifcfg-ppp0", %toreplace); + 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; + foreach ("$o->{prefix}/root", "$o->{prefix}/etc/skel") { template2file("/usr/share/kppprc.in", "$_/.kde/share/config/kppprc", %toreplace) if -d "$_/.kde/share/config"; } @@ -456,6 +488,9 @@ sub miscellaneous { sub exitInstall { install_any::unlockCdroms; install_any::ejectCdrom; + + #- ala pixel? :-) [fpons] + sync(); sync(); } #-###################################################################################### diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index c5f1a4526..7cd0d2ae2 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -244,7 +244,7 @@ sub choosePackages { sub configureNetwork($) { my ($o, $first_time) = @_; local $_; - if ($o->{intf}) { + if ($o->{intf} && $o->{netc}{NETWORKING} ne 'false') { if (!$::beginner && $first_time) { my @l = ( __("Keep the current IP configuration"), @@ -345,7 +345,7 @@ sub pppConfig { my ($o) = @_; my $m = $o->{modem} ||= {}; - unless ($m->{device} || $::expert && $o->ask_yesorno('', _("Skip modem autodetection?"), 1)) { + unless ($m->{device} || $::expert && $o->ask_yesorno('', _("Try to find a modem?"), 1)) { foreach (0..3) { next if readlink("$o->{prefix}/dev/mouse") =~ /ttyS$_/; detect_devices::hasModem("$o->{prefix}/dev/ttyS$_") @@ -358,7 +358,7 @@ sub pppConfig { [ mouse::serial_ports_names ])); install_steps::pppConfig($o) if $o->ask_from_entries_refH('', - _("Dialup options"), [ + _("Dialup options"), [ _("Connection name") => \$m->{connection}, _("Phone number") => \$m->{phone}, _("Login ID") => \$m->{login}, @@ -583,7 +583,7 @@ sub setRootPassword($) { return if $o->{security} < 1 && !$clicked; - $o->ask_from_entries_refH([_("Set root password"), _("Ok"), $o->{security} > 3 ? () : _("No password")], + $o->ask_from_entries_refH([_("Set root password"), _("Ok"), $o->{security} > 2 ? () : _("No password")], _("Set root password"), [ _("Password") => { val => \$sup->{password}, hidden => 1 }, _("Password (again)") => { val => \$sup->{password2}, hidden => 1 }, @@ -808,12 +808,12 @@ _("Default") => { val => \$default, type => 'bool' }, sub miscellaneous { my ($o, $clicked) = @_; my %l = ( - 0 => _("Windows(TM)"), - 1 => _("Poor"), + #- abusive 0 => _("Windows(TM)"), + #- unused 1 => _("Poor"), 2 => _("Low"), 3 => _("Medium"), 4 => _("High"), - 5 => _("Paranoid"), + #- unused 5 => _("Paranoid"), ); my $u = $o->{miscellaneous} ||= {}; exists $u->{LAPTOP} or $u->{LAPTOP} = 1; |