summaryrefslogtreecommitdiffstats
path: root/perl-install/resize_fat
Commit message (Expand)AuthorAgeFilesLines
* re-sync after the big svn lossPascal Rigaux2007-04-251-5/+0
* don't need use MDK::Common... when we have "use common" (which is the standar...Pascal Rigaux2005-06-101-1/+0
* gcc 4.0 was choking on lvalues of unpredictable type.Rafael Garcia-Suarez2005-05-061-2/+5
* remove old debug codePascal Rigaux2005-04-131-1/+0
* better english (writing style rather than spoken one)Thierry Vignaud2004-12-133-4/+4
* prototypes are dangerousPascal Rigaux2004-09-101-1/+1
* kill warningsThierry Vignaud2004-09-091-0/+3
* remove check_mounted(), it is done by diskdrakePascal Rigaux2004-08-121-11/+0
* perl_checker compliancePascal Rigaux2004-08-121-3/+2
* perl_checker fixesPascal Rigaux2004-01-051-1/+1
* perl_checker adaptations + fixesPascal Rigaux2003-04-241-1/+1
* new perl_checker compliancePascal Rigaux2003-04-172-4/+4
* remove unused variables or rename them with an underscore (eg: $o becomes $_o)Pascal Rigaux2002-12-043-3/+3
* perl_checker adaptationsPascal Rigaux2002-11-282-4/+4
* remove debug codePascal Rigaux2002-11-281-1/+0
* to export, one needs to inheritate from ExporterPascal Rigaux2002-11-281-1/+1
* perl_checker adaptationsPascal Rigaux2002-11-273-13/+10
* - add/remove spaces to make perl_checker happyPascal Rigaux2002-11-142-3/+3
* add/remove spaces to make perl_checker happyPascal Rigaux2002-11-131-2/+2
* add or remove spaces where need to please perl_checkerPascal Rigaux2002-11-113-4/+4
* - use "foreach" instead of "for" in list contextPascal Rigaux2002-11-111-1/+1
* various small syntax enhancements to please perl_checkerPascal Rigaux2002-11-111-2/+2
* make perl_checker happy again (replacing "{xx}->{yy}" by "{xx}{yy}")Pascal Rigaux2002-07-312-3/+3
* make new perl_checker happyPascal Rigaux2002-07-311-20/+1
* make new perl_checker happy (and that's not easy!)Pascal Rigaux2002-07-312-2/+2
* ensure things build as they should when perl is upgraded on compilation boxPascal Rigaux2002-07-221-1/+1
* fixPascal Rigaux2001-08-071-1/+1
* switch to MDK::Common (i wonder why it was not done yet)Pascal Rigaux2001-07-301-3/+4
* move to MDK::Common, bool->to_boolPascal Rigaux2001-07-245-5/+5
* s/Linux-Mandrake/Mandrake Linux/Pascal Rigaux2001-06-212-2/+2
* no_commentPascal Rigaux2000-09-149-9/+9
* no_commentPascal Rigaux2000-08-111-1/+5
* no_commentPascal Rigaux2000-08-061-6/+11
* *** empty log message ***Francois Pons2000-05-021-3/+5
* *** empty log message ***Francois Pons2000-05-023-2/+5
* *** empty log message ***Francois Pons2000-04-142-10/+25
* *** empty log message ***Francois Pons2000-04-114-19/+87
* no_commentPascal Rigaux2000-03-301-1/+2
* no_commentPascal Rigaux2000-02-111-1/+1
* *** empty log message ***Francois Pons2000-02-095-23/+29
* no_commentPascal Rigaux2000-02-091-1/+1
* *** empty log message ***Francois Pons2000-02-096-28/+81
* no_commentPascal Rigaux2000-02-091-11/+7
* no_commentPascal Rigaux2000-01-011-1/+1
* no_commentPascal Rigaux1999-12-081-1/+1
* no_commentPascal Rigaux1999-12-021-0/+1
* no_commentPascal Rigaux1999-11-221-1/+1
* no_commentPascal Rigaux1999-11-147-64/+126
* no_commentPascal Rigaux1999-10-251-1/+1
* no_commentPascal Rigaux1999-10-131-1/+1
r">'SLAVE="ippp1" ')); output "$prefix/etc/isdn/profile/card/mycard", qq( I4L_MODULE="$isdn->{driver}" I4L_TYPE="$isdn->{type}" I4L_IRQ="$isdn->{irq}" I4L_MEMBASE="$isdn->{mem}" I4L_PORT="$isdn->{io}" I4L_IO0="$isdn->{io0}" I4L_IO1="$isdn->{io1}" I4L_ID="HiSax" I4L_FIRMWARE="$isdn->{firmware}" ); output "$prefix/etc/ppp/ioptions", "lock usepeerdns defaultroute "; system "$prefix/etc/rc.d/init.d/isdn4linux restart"; substInFile { s/^FIRMWARE.*\n//; $_ .= qq(FIRMWARE="$isdn->{firmware}"\n) if eof } "$prefix/etc/sysconfig/network-scripts/ifcfg-ippp0"; # we start the virtual interface at boot (we dial only on demand. substInFile { s/^ONBOOT.*\n//; $_ .= qq(ONBOOT=yes\n) if eof } "$prefix/etc/sysconfig/network-scripts/ifcfg-ippp0"; write_secret_backend($isdn->{login}, $isdn->{passwd}); write_cnx_script($netc, "isdn", "#/sbin/route del default #/sbin/ifup ippp0 /usr/sbin/isdnctrl dial ippp0 " . if_($isdn->{speed} =~ /128/, "service ibod restart "), "/usr/sbin/isdnctrl hangup ippp0 #/sbin/ifdown ippp0 " . if_($isdn->{speed} =~ /128/, "service ibod stop "), $netc->{isdntype}); 1; } sub isdn_read_config { my ($isdn) = @_; my %match = (I4L_USERNAME => 'login', I4L_LOCALMSN => 'phone_in', I4L_REMOTE_OUT => 'phone_out', I4L_DIALMODE => 'dialing_mode', I4L_MODULE => 'driver', I4L_TYPE => 'type', I4L_IRQ => 'irq', I4L_MEMBASE => 'mem', I4L_PORT => 'io', I4L_IO0 => 'io0', I4L_IO1 => 'io1', I4L_FIRMWARE => 'firmware'); foreach ('link/myisp', 'card/mycard') { my %conf = getVarsFromSh("$prefix/etc/isdn/profile/$_"); foreach (keys %conf) { $isdn->{$match{$_}} = $conf{$_} if $match{$_}; } } $isdn->{passwd} = network::tools::passwd_by_login($isdn->{login}); #$isdn->{description} = ''; #$isdn->{vendor} = ''; #$isdn->{passwd2} = ''; $isdn; } sub get_info_providers_backend { my ($isdn, $_netc, $name, $file) = @_; $name eq 'Unlisted - edit manually' and return; foreach (catMaybeCompressed($file)) { chop; my ($name_, $phone, $real, $dns1, $dns2) = split '=>'; if ($name eq $name_) { @$isdn{qw(user_name phone_out DOMAINNAME2 dnsServer3 dnsServer2)} = ((split(/\|/, $name_))[2], $phone, $real, $dns1, $dns2); } } } sub isdn_ask_info { my ($isdn, $netc) = @_; my $f = "$ENV{SHARE_PATH}/ldetect-lst/isdn.db"; $f = "$prefix$f" if !-e $f; isdn_ask_info_step1: my $str = $in->ask_from_treelist(N("ISDN Configuration"), N("Select your provider.\nIf it isn't listed, choose Unlisted."), '|', ['Unlisted - edit manually', read_providers_backend($f)], 'Unlisted - edit manually') or return; get_info_providers_backend($isdn, $netc, $str || 'Unlisted - edit manually', $f); $isdn->{huptimeout} = 180; $isdn->{$_} ||= '' foreach qw(phone_in phone_out dialing_mode login passwd passwd2 idl speed); add2hash($netc, { dnsServer2 => '', dnsServer3 => '', DOMAINNAME2 => '' }); ask_info2($isdn, $netc) or goto isdn_ask_info_step1; } sub isdn_ask_protocol() { my @toto = ( { description => $::expert ? N("European protocol (EDSS1)") : N("European protocol"), protokol => 2 }, { description => $::expert ? N("Protocol for the rest of the world\nNo D-Channel (leased lines)") : N("Protocol for the rest of the world"), protokol => 3 } ); my $e = $in->ask_from_listf(N("ISDN Configuration"), N("Which protocol do you want to use?"), sub { $_[0]{description} }, \@toto) or return 0; $e->{protokol}; } sub isdn_ask { my ($isdn, $netc, $label) = @_; #- ISDN card already detected if (!$::expert && defined $netc->{autodetect}{isdn}{card_type}) { $in->ask_yesorno(N("ISDN Configuration"), N("Found \"%s\" interface do you want to use it ?", $netc->{autodetect}{isdn}{description}), 1) or return; $isdn->{$_} = $netc->{autodetect}{isdn}{$_} foreach qw(description vendor id card_type driver type mem io io0 io1 irq firmware); goto isdn_ask_step_3; } isdn_ask_step_1: my $e = $in->ask_from_list_(N("ISDN Configuration"), $label . "\n" . N("What kind of card do you have?"), [ N_("ISA / PCMCIA"), N_("PCI"), N_("I don't know") ] ) or return; isdn_ask_step_1b: if ($e =~ /PCI/) { $isdn->{card_type} = 'pci'; } else { $in->ask_from_list_(N("ISDN Configuration"), N(" If you have an ISA card, the values on the next screen should be right.\n If you have a PCMCIA card, you have to know the \"irq\" and \"io\" of your card. "), [ N_("Continue"), N_("Abort") ]) eq 'Continue' or goto isdn_ask_step_1; $isdn->{card_type} = 'isa'; } isdn_ask_step_2: $e = $in->ask_from_listf(N("ISDN Configuration"), N("Which of the following is your ISDN card?"), sub { $_[0]{description} }, [ grep { $_->{card} eq $isdn->{card_type} } @isdndata ]) or goto isdn_ask_step_1b; $e->{$_} and $isdn->{$_} = $e->{$_} foreach qw(driver type mem io io0 io1 irq firmware); isdn_ask_step_3: $isdn->{protocol} = isdn_ask_protocol() or goto isdn_ask_step_2; isdn_ask_step_4: isdn_ask_info($isdn, $netc) or goto isdn_ask_step_3; isdn_write_config($isdn, $netc) or goto isdn_ask_step_4; 1; } sub isdn_detect { my ($isdn, $netc) = @_; if ($isdn->{id}) { log::l("found isdn card : $isdn->{description}; vendor : $isdn->{vendor}; id : $isdn->{id}; driver : $isdn->{driver}\n"); $isdn->{description} =~ s/\|/ -- /; isdn_detect_step_0: defined $isdn->{type} and my $new = $in->ask_yesorno(N("ISDN Configuration"), N("Do you want to start a new configuration ?"), 1); if ($isdn->{type} eq '' || $new) { isdn_ask($isdn, $netc, N("I have detected an ISDN PCI card, but I don't know its type. Please select a PCI card on the next screen.")) or goto isdn_detect_step_0; } else { isdn_detect_step_1: $isdn->{protocol} = isdn_ask_protocol() or goto isdn_detect_step_0; isdn_detect_step_2: isdn_ask_info($isdn, $netc) or goto isdn_detect_step_1; isdn_write_config($isdn, $netc) or goto isdn_detect_step_2; } } else { isdn_ask($isdn, $netc, N("No ISDN PCI card found. Please select one on the next screen.")) or return; } $netc->{$_} = 'ippp0' foreach 'NET_DEVICE', 'NET_INTERFACE'; 1; } sub isdn_detect_backend { my ($isdn) = @_; if (my ($c) = modules::probe_category('network/isdn')) { $isdn->{$_} = $c->{$_} foreach qw(description vendor id driver options firmware); $isdn->{$_} = sprintf("%0x", $isdn->{$_}) foreach 'vendor', 'id'; $isdn->{card_type} = 'pci'; ($isdn->{type}) = $isdn->{options} =~ /type=(\d+)/; # $c->{options} !~ /id=HiSax/ && $isdn->{driver} eq "hisax" and $c->{options} .= " id=HiSax"; if ($c->{options} !~ /protocol=/ && $isdn->{protocol} =~ /\d/) { modules::set_options($c->{driver}, $c->{options} . " protocol=" . $isdn->{protocol}); } $c->{options} =~ /protocol=(\d)/ and $isdn->{protocol} = $1; } } sub isdn_get_list() { map { $_->{description} } @isdndata; } sub isdn_get_info { my ($desc) = @_; foreach (@isdndata) { return $_ if $_->{description} eq $desc; } } 1;