summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-07-25 15:50:57 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-07-25 15:50:57 +0000
commit509059250b46a223051f0d7daa64461596d197d8 (patch)
tree6cb0136ac649d1a4628a991191376520fb3a562e
parent830c414dd3c6eb3e3371e7306412d181b6cf2408 (diff)
downloaddrakx-509059250b46a223051f0d7daa64461596d197d8.tar
drakx-509059250b46a223051f0d7daa64461596d197d8.tar.gz
drakx-509059250b46a223051f0d7daa64461596d197d8.tar.bz2
drakx-509059250b46a223051f0d7daa64461596d197d8.tar.xz
drakx-509059250b46a223051f0d7daa64461596d197d8.zip
Help "perl -cw" not reporting any warning
- for mac free partition, use $freepart instead of $freepart_device, $freepart_size ... - replace $timezone::ntp_servers by a function
-rw-r--r--perl-install/install_steps_interactive.pm13
-rw-r--r--perl-install/partition_table/mac.pm13
-rw-r--r--perl-install/timezone.pm5
3 files changed, 15 insertions, 16 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 1ab9bab30..e9b35d922 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -383,12 +383,13 @@ Continue at your own risk!"));
#- don't do anything if we've got the bootstrap setup
#- otherwise, go ahead and create one somewhere in the drive free space
} else {
- if (defined $partition_table::mac::freepart_start && $partition_table::mac::freepart_size >= 1) {
- my ($hd) = $partition_table::mac::freepart_device;
- log::l("creating bootstrap partition on drive /dev/$hd->{device}, block $partition_table::mac::freepart_start");
- $partition_table::mac::bootstrap_part = $partition_table::mac::freepart_part;
+ undef = $partition_table::mac::freepart; #- please "perl -w"
+ my $freepart = $partition_table::mac::freepart;
+ if ($freepart && $freepart->{size} >= 1) {
+ log::l("creating bootstrap partition on drive /dev/$freepart->{hd}{device}, block $freepart->{start}");
+ $partition_table::mac::bootstrap_part = $freepart->{part};
log::l("bootstrap now at $partition_table::mac::bootstrap_part");
- fsedit::add($hd, { start => $partition_table::mac::freepart_start, size => 1 << 11, type => 0x401, mntpoint => '' }, $o->{all_hds}, { force => 1, primaryOrExtended => 'Primary' });
+ fsedit::add($freepart->{hd}, { start => $freepart->{start}, size => 1 << 11, type => 0x401, mntpoint => '' }, $o->{all_hds}, { force => 1, primaryOrExtended => 'Primary' });
$new_bootstrap = 1;
} else {
$o->ask_warn('',_("No free space for 1MB bootstrap! Install will continue, but to boot your system, you'll need to create the bootstrap partition in DiskDrake"));
@@ -958,7 +959,7 @@ sub configureTimezone {
]) or goto &configureTimezone
if $::expert || $clicked;
if ($ntp) {
- my @servers = split("\n", $timezone::ntp_servers);
+ my @servers = split("\n", timezone::ntp_servers());
$o->ask_from('', '',
[ { label => _("NTP Server"), val => \$o->{timezone}{ntp}, list => \@servers, not_edit => 0 } ]
diff --git a/perl-install/partition_table/mac.pm b/perl-install/partition_table/mac.pm
index 89fb9ceaf..45c614139 100644
--- a/perl-install/partition_table/mac.pm
+++ b/perl-install/partition_table/mac.pm
@@ -2,7 +2,7 @@ package partition_table::mac; # $Id$
use diagnostics;
#use strict; - fixed other PPC code to comply, but program bails on empty partition table - sbenedict
-use vars qw(@ISA $freepart_device $bootstrap_part $freepart_start $freepart_size $freepart_part $macos_part);
+use vars qw(@ISA $freepart $bootstrap_part $macos_part);
@ISA = qw(partition_table::raw);
@@ -144,14 +144,11 @@ sub read($$) {
$h{pName} =~ /swap/i ? ($h{type} = 0x82) : ($h{type} = 0x83);
} elsif ($h{pType} =~ /^Apple_Free/i) {
#- need to locate a 1MB partition to setup a bootstrap on
- if (defined $freepart_start && $freepart_size >= 1) {
- #- already found a suitable partition
+ if ($freepart && $freepart->{size} >= 1) {
+ #- already found a suitable partition
} else {
- $freepart_start = $h{start};
- $freepart_size = $h{size}/2048;
- $freepart_device = $hd;
- $freepart_part = "/dev/" . $hd->{device} . ($i+1);
- log::l("free apple partition found on drive /dev/$freepart_device->{device}, block $freepart_start, size $freepart_size");
+ $freepart = { start => $h{start}, size => $h{size}/2048, hd => $hd, part => "/dev/$hd->{device}" . ($i+1) };
+ log::l("free apple partition found on drive /dev/$freepart->{hd}{device}, block $freepart->{start}, size $freepart->{size}");
}
$h{type} = 0x0;
$h{pName} = 'Extra';
diff --git a/perl-install/timezone.pm b/perl-install/timezone.pm
index bf78d4ff1..fdcdf1aa9 100644
--- a/perl-install/timezone.pm
+++ b/perl-install/timezone.pm
@@ -2,7 +2,7 @@ package timezone; # $Id$
use diagnostics;
use strict;
-use vars qw($ntp_servers);
+use vars;
use common;
use log;
@@ -157,7 +157,7 @@ sub sexProb($) {
$nb ? $prob / $nb : 0.5;
}
-$ntp_servers =
+sub ntp_servers {
q(Australia (ntp.adelaide.edu.au)
Australia (ntp.saard.net)
Australia (time.esec.com.au)
@@ -194,5 +194,6 @@ United states IN (gilbreth.ecn.purdue.edu)
United states IN (harbor.ecn.purdue.edu)
United states IN (molecule.ecn.purdue.edu)
);
+}
1;