summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-07-23 11:08:35 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-07-23 11:08:35 +0000
commit61b0cd36577df2a9f86cb2c08d14737f0bbcb557 (patch)
tree08dfd2ab02af6b7c7410158a531a95c2db7b3350 /perl-install
parent6ed6b5341362f87e3c70420f206a33f71c72a3de (diff)
downloaddrakx-backup-do-not-use-61b0cd36577df2a9f86cb2c08d14737f0bbcb557.tar
drakx-backup-do-not-use-61b0cd36577df2a9f86cb2c08d14737f0bbcb557.tar.gz
drakx-backup-do-not-use-61b0cd36577df2a9f86cb2c08d14737f0bbcb557.tar.bz2
drakx-backup-do-not-use-61b0cd36577df2a9f86cb2c08d14737f0bbcb557.tar.xz
drakx-backup-do-not-use-61b0cd36577df2a9f86cb2c08d14737f0bbcb557.zip
g Move 2: partition table: hierarchy
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Makefile6
-rw-r--r--perl-install/Makefile.config2
-rw-r--r--perl-install/Makefile.drakxtools4
-rw-r--r--perl-install/any.pm6
-rw-r--r--perl-install/bootloader.pm8
-rw-r--r--perl-install/detect_devices.pm4
-rw-r--r--perl-install/diskdrake/hd_gtk.pm2
-rw-r--r--perl-install/diskdrake/interactive.pm8
-rw-r--r--perl-install/drakxtools.spec1
-rw-r--r--perl-install/fsedit.pm12
-rw-r--r--perl-install/install_any.pm6
-rw-r--r--perl-install/install_interactive.pm4
-rw-r--r--perl-install/install_steps.pm2
-rw-r--r--perl-install/install_steps_interactive.pm16
-rw-r--r--perl-install/partition_table.pm10
-rw-r--r--perl-install/partition_table/bsd.pm (renamed from perl-install/partition_table_bsd.pm)10
-rw-r--r--perl-install/partition_table/dos.pm (renamed from perl-install/partition_table_dos.pm)10
-rw-r--r--perl-install/partition_table/empty.pm (renamed from perl-install/partition_table_empty.pm)10
-rw-r--r--perl-install/partition_table/gpt.pm (renamed from perl-install/partition_table_gpt.pm)18
-rw-r--r--perl-install/partition_table/lvm_PV.pm (renamed from perl-install/partition_table_lvm_PV.pm)8
-rw-r--r--perl-install/partition_table/mac.pm (renamed from perl-install/partition_table_mac.pm)12
-rw-r--r--perl-install/partition_table/raw.pm (renamed from perl-install/partition_table_raw.pm)6
-rw-r--r--perl-install/partition_table/sun.pm (renamed from perl-install/partition_table_sun.pm)10
-rw-r--r--perl-install/standalone.pm2
24 files changed, 89 insertions, 88 deletions
diff --git a/perl-install/Makefile b/perl-install/Makefile
index 239c4248b..3994a30e7 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -7,7 +7,7 @@ include Makefile.config
POFILES = $(shell ls share/po/*.po)
MOFILES = $(POFILES:%.po=%.mo)
-DISTFILES = Makefile Makefile.config Newt apps.net_monitor diskdrake c ddcprobe drakxtools.spec pam.net_monitor serial_probe share/po sbus_probing resize_fat share/diskdrake.rc $(STANDALONEPMS) standalone/icons pixmaps network interactive standalone/interactive_http rpcinfo-flushed.c *.pm security harddrake
+DISTFILES = Makefile Makefile.config Newt apps.net_monitor diskdrake c ddcprobe drakxtools.spec pam.net_monitor serial_probe share/po sbus_probing resize_fat share/diskdrake.rc $(STANDALONEPMS) standalone/icons pixmaps network interactive partition_table standalone/interactive_http rpcinfo-flushed.c *.pm security harddrake
OTHERS = $(OTHERDIRS) $(OTHERFILES)
OTHERDIRS = tools/ddcprobe tools/serial_probe
OTHERFILES = tools/rpcinfo-flushed.c
@@ -37,8 +37,8 @@ localcopy: clean
$(MAKE) -C ../tools clean || :
cd .. ; rm -rf $(PACKAGE)-$(PKGVERSION) ; cp -af perl-install $(PACKAGE)-$(PKGVERSION) ; cp -af $(OTHERS) $(PACKAGE)-$(PKGVERSION)
cd
- find ../$(PACKAGE)-$(PKGVERSION) -name '*.pm' | xargs perl -pi -e 's/\s*use\s+(diagnostics|vars|strict)//g'
- find ../$(PACKAGE)-$(PKGVERSION)/standalone -type f | xargs perl -pi -e 's/\s*use\s+(diagnostics|vars|strict)//g'
+ find ../$(PACKAGE)-$(PKGVERSION) -name '*.pm' | xargs perl -pi -e 's/\s*use\s+(diagnostics|vars|strict).*//g'
+ find ../$(PACKAGE)-$(PKGVERSION)/standalone -type f | xargs perl -pi -e 's/\s*use\s+(diagnostics|vars|strict).*//g'
$(DIRS):
diff --git a/perl-install/Makefile.config b/perl-install/Makefile.config
index 0081767ac..dabc34066 100644
--- a/perl-install/Makefile.config
+++ b/perl-install/Makefile.config
@@ -5,7 +5,7 @@ ARCH := $(patsubst sparc%,sparc,$(ARCH))
VERSION = 2.2.10-BOOT
SUDO = sudo
SO_FILES = c/blib/arch/auto/c/c.so
-PMS = *.pm Newt/*.pm c/stuff.pm resize_fat/*.pm sbus_probing/*.pm network/*.pm interactive/*.pm diskdrake/*.pm harddrake/*.pm commands install2 g_auto_install live_install live_install2 share/advertising/*.pl
+PMS = *.pm Newt/*.pm c/stuff.pm resize_fat/*.pm sbus_probing/*.pm network/*.pm interactive/*.pm partition_table/*.pm diskdrake/*.pm harddrake/*.pm commands install2 g_auto_install live_install live_install2 share/advertising/*.pl
STANDALONEPMS_ = diskdrake XFdrake mousedrake printerdrake logdrake keyboarddrake drakconnect drakbackup drakfont drakproxy localedrake net_monitor drakbug_report tinyfirewall drakxconf drakxservices draksec drakboot adduserdrake drakgw drakautoinst livedrake lsnetdrake scannerdrake fileshareset drakxtv drakfloppy harddrake2 drakTermServ service_harddrake service_harddrake.sh drakbug
STANDALONEPMS = $(STANDALONEPMS_:%=standalone/%)
ALLPMS = $(PMS) $(STANDALONEPMS)
diff --git a/perl-install/Makefile.drakxtools b/perl-install/Makefile.drakxtools
index 032556e50..6b6dadfc9 100644
--- a/perl-install/Makefile.drakxtools
+++ b/perl-install/Makefile.drakxtools
@@ -26,7 +26,7 @@ $(DIRS):
[ ! -e $@/Makefile ] || $(MAKE) -C $@
install:
- mkdir -p $(BINDEST) $(ETCDEST) $(SBINDEST) $(DATADIR)/{harddrake,pixmaps} $(LIBDEST)/{network,security,harddrake,interactive} $(BINX11DEST) $(LIBX11DEST) $(PIXDIR) $(INITDIR)
+ mkdir -p $(BINDEST) $(ETCDEST) $(SBINDEST) $(DATADIR)/{harddrake,pixmaps} $(LIBDEST)/{network,security,harddrake,interactive,partition_table} $(BINX11DEST) $(LIBX11DEST) $(PIXDIR) $(INITDIR)
install -d $(INLIBDEST_DIRS:%=$(LIBDEST)/%)
install $(STANDALONEPMS) $(SBINDEST)
install -s rpcinfo-flushed ddcprobe/ddcxinfos serial_probe/serial_probe $(SBINDEST)
@@ -35,7 +35,7 @@ install:
mv -f $(SBINDEST)/lsnetdrake $(BINDEST)/lsnetdrake
install -m 644 *.pm $(LIBDEST)
- for i in network harddrake security interactive; do install -m 644 $$i/*.pm $(LIBDEST)/$$i/;done
+ for i in network harddrake security interactive partition_table; do install -m 644 $$i/*.pm $(LIBDEST)/$$i/;done
install -m 644 pixmaps/* $(PIXDIR)
install -m 644 share/diskdrake.rc $(DATADIR)/$(NAME)
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 0f472748c..44d23a204 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -122,8 +122,8 @@ sub setupBootloader {
_("Where do you want to install the bootloader?"),
\@l, $l[$b->{use_partition}]) or return 0;
} elsif (arch() =~ /ppc/) {
- if (defined $partition_table_mac::bootstrap_part) {
- $b->{boot} = $partition_table_mac::bootstrap_part;
+ if (defined $partition_table::mac::bootstrap_part) {
+ $b->{boot} = $partition_table::mac::bootstrap_part;
log::l("set bootstrap to $b->{boot}");
} else {
die "no bootstrap partition - yaboot.conf creation failed";
@@ -195,7 +195,7 @@ sub setupBootloader {
}
) or return 0;
} else {
- $b->{boot} = $partition_table_mac::bootstrap_part;
+ $b->{boot} = $partition_table::mac::bootstrap_part;
$in->ask_from('', _("Bootloader main options"), [
{ label => _("Bootloader to use"), val => \$bootloader, list => [ keys(%bootloaders) ], format => \&translate },
{ label => _("Init Message"), val => \$b->{'init-message'} },
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index aa844921c..a0b18f69a 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -15,7 +15,7 @@ use fsedit;
use devices;
use loopback;
use detect_devices;
-use partition_table_raw;
+use partition_table::raw;
use run_program;
use modules;
@@ -126,7 +126,7 @@ sub read($$) {
sub suggest_onmbr {
my ($hds) = @_;
- my $type = partition_table_raw::typeOfMBR($hds->[0]{device});
+ my $type = partition_table::raw::typeOfMBR($hds->[0]{device});
!$type || member($type, qw(dos dummy lilo grub empty)), !$type;
}
@@ -406,11 +406,11 @@ wait %d seconds for default boot.
}
} elsif (arch() =~ /ppc/) {
#- if we identified a MacOS partition earlier - add it
- if (defined $partition_table_mac::macos_part) {
+ if (defined $partition_table::mac::macos_part) {
add_entry($lilo->{entries},
{
label => "macos",
- kernel_or_dev => $partition_table_mac::macos_part
+ kernel_or_dev => $partition_table::mac::macos_part
});
}
} elsif (arch() !~ /ia64/) {
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index c8fbc762d..f53f4d750 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -160,8 +160,8 @@ sub isRemovableDrive { &isZipDrive || &isLS120Drive || $_[0]->{media_type} eq 'f
sub isFloppyOrHD {
my ($dev) = @_;
- require partition_table_raw;
- my $geom = partition_table_raw::get_geometry(devices::make($dev));
+ require partition_table::raw;
+ my $geom = partition_table::raw::get_geometry(devices::make($dev));
$geom->{totalsectors} < 10 << 11 ? 'fd' : 'hd';
}
diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm
index 2de971f89..35342c6e3 100644
--- a/perl-install/diskdrake/hd_gtk.pm
+++ b/perl-install/diskdrake/hd_gtk.pm
@@ -7,7 +7,7 @@ use common;
use resize_fat::main;
use my_gtk qw(:helpers :wrappers :ask);
use partition_table qw(:types);
-use partition_table_raw;
+use partition_table::raw;
use detect_devices;
use diskdrake::interactive;
use run_program;
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index 0cefc1d05..7a76ff2e8 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -5,7 +5,7 @@ use strict;
use common;
use partition_table qw(:types);
-use partition_table_raw;
+use partition_table::raw;
use detect_devices;
use run_program;
use loopback;
@@ -274,7 +274,7 @@ sub Clear_all {
if (isLVM($hd)) {
lvm::lv_delete($hd, $_) foreach @parts
} else {
- partition_table_raw::zero_MBR_and_dirty($hd);
+ partition_table::raw::zero_MBR_and_dirty($hd);
}
}
@@ -488,7 +488,7 @@ sub Delete {
fsedit::recompute_loopbacks($all_hds);
} else {
if (arch() =~ /ppc/) {
- undef $partition_table_mac::bootstrap_part if (isAppleBootstrap($part) && ($part->{device} = $partition_table_mac::bootstrap_part));
+ undef $partition_table::mac::bootstrap_part if (isAppleBootstrap($part) && ($part->{device} = $partition_table::mac::bootstrap_part));
}
partition_table::remove($hd, $part);
warn_if_renumbered($in, $hd);
@@ -624,7 +624,7 @@ sub Resize {
}
#- make sure that even after normalizing the size to cylinder boundaries, the minimun will be saved,
#- this save at least a cylinder (less than 8Mb).
- $min += partition_table_raw::cylinder_size($hd);
+ $min += partition_table::raw::cylinder_size($hd);
$min >= $max and return $in->ask_warn('', _("This partition is not resizeable"));
#- for these, we have tools to resize partition table
diff --git a/perl-install/drakxtools.spec b/perl-install/drakxtools.spec
index ebb084715..2cf4a7a75 100644
--- a/perl-install/drakxtools.spec
+++ b/perl-install/drakxtools.spec
@@ -248,6 +248,7 @@ done
* Tue Jul 23 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.1.8-9mdk
- reorganization cleanup:
move interactive_* into interactive::*
+ move partition_table_* into partition_table::*
* Sun Jul 21 2002 Pixel <pixel@mandrakesoft.com> 1.1.8-8mdk
- new snapshot (beware of XFdrake)
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 5b700d387..b1bb6ea6b 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -9,7 +9,7 @@ use vars qw(%suggestions);
#-######################################################################################
use common;
use partition_table qw(:types);
-use partition_table_raw;
+use partition_table::raw;
use detect_devices;
use fsedit;
use devices;
@@ -143,7 +143,7 @@ sub hds {
foreach (@$drives) {
my $file = devices::make($_->{device});
- my $hd = partition_table_raw::get_geometry($file) or log::l("An error occurred while getting the geometry of block device $file: $!"), next;
+ my $hd = partition_table::raw::get_geometry($file) or log::l("An error occurred while getting the geometry of block device $file: $!"), next;
add2hash_($hd, $_);
$hd->{file} = $file;
$hd->{prefix} = $hd->{device};
@@ -153,7 +153,7 @@ sub hds {
eval { partition_table::read($hd, $flags->{clearall} || member($_->{device}, @{$flags->{clear} || []})) };
if ($@) {
cdie "ask_before_blanking:$@";
- partition_table_raw::zero_MBR($hd);
+ partition_table::raw::zero_MBR($hd);
}
member($_->{device}, @{$flags->{clear} || []}) and partition_table::remove($hd, $_)
foreach partition_table::get_normal_parts($hd);
@@ -164,7 +164,7 @@ sub hds {
#- special case for type overloading (eg: reiserfs is 0x183)
foreach (grep { isExt2($_) } partition_table::get_normal_parts($hd)) {
my $type = typeOfPart($_->{device});
- $_->{type} = $type if $type > 0x100 || $type && $hd->isa('partition_table_gpt');
+ $_->{type} = $type if $type > 0x100 || $type && $hd->isa('partition_table::gpt');
}
push @hds, $hd;
}
@@ -691,7 +691,7 @@ sub rescuept($) {
}
close F or die "rescuept failed";
- partition_table_raw::zero_MBR($hd);
+ partition_table::raw::zero_MBR($hd);
foreach (@hd) {
my $b = partition_table::verifyInside($_, $ext);
if ($b) {
@@ -726,7 +726,7 @@ sub verifyHds {
if ($readonly && !$ok) {
log::l("using /proc/partitions as diskdrake failed :(");
foreach my $hd (@$hds) {
- partition_table_raw::zero_MBR($hd);
+ partition_table::raw::zero_MBR($hd);
$hd->{primary} = { normal => [ grep { $hd->{device} eq $_->{rootDevice} } @parts ] };
}
$ok = 1;
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 2a93b2be1..ea78b14aa 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -18,7 +18,7 @@ use MDK::Common::System;
use common;
use run_program;
use partition_table qw(:types);
-use partition_table_raw;
+use partition_table::raw;
use devices;
use fsedit;
use modules;
@@ -989,7 +989,7 @@ sub getHds {
my $flags = $o->{partitioning};
my @drives = detect_devices::hds();
-# add2hash_($o->{partitioning}, { readonly => 1 }) if partition_table_raw::typeOfMBR($drives[0]{device}) eq 'system_commander';
+# add2hash_($o->{partitioning}, { readonly => 1 }) if partition_table::raw::typeOfMBR($drives[0]{device}) eq 'system_commander';
getHds:
my $all_hds = catch_cdie { fsedit::hds(\@drives, $flags) }
@@ -1007,7 +1007,7 @@ sub getHds {
goto getHds;
}
if (!$::testing) {
- @$hds = grep { eval { partition_table_raw::test_for_bad_drives($_) }; !$@ } @$hds;
+ @$hds = grep { eval { partition_table::raw::test_for_bad_drives($_) }; !$@ } @$hds;
}
$ok = fsedit::verifyHds($hds, $flags->{readonly}, $ok)
diff --git a/perl-install/install_interactive.pm b/perl-install/install_interactive.pm
index b9ee10de7..53c92d2ed 100644
--- a/perl-install/install_interactive.pm
+++ b/perl-install/install_interactive.pm
@@ -7,7 +7,7 @@ use vars;
use common;
use partition_table qw(:types);
-use partition_table_raw;
+use partition_table::raw;
use detect_devices;
use install_steps;
use devices;
@@ -180,7 +180,7 @@ When sure, press Ok.")) or return;
\&partition_table::description, $hds) or return;
$o->set_help('takeOverHdConfirm');
$o->ask_okcancel('', _("ALL existing partitions and their data will be lost on drive %s", partition_table::description($hd))) or return;
- partition_table_raw::zero_MBR($hd);
+ partition_table::raw::zero_MBR($hd);
fsedit::auto_allocate($all_hds);
1;
} ];
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 53f32a45e..b4f1fb97d 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -157,7 +157,7 @@ sub doPartitionDisksAfter {
fsedit::get_root_($o->{fstab}) or die "Oops, no root partition";
if (arch() =~ /ppc/ && detect_devices::get_mac_generation =~ /NewWorld/) {
- die "Need bootstrap partition to boot system!" if !(defined $partition_table_mac::bootstrap_part);
+ die "Need bootstrap partition to boot system!" if !(defined $partition_table::mac::bootstrap_part);
}
if (arch() =~ /ia64/ && !fsedit::has_mntpoint("/boot/efi", $o->{all_hds})) {
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 4f04a8dcb..1ab9bab30 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -42,7 +42,7 @@ copyright laws applicable to software programs.
#-######################################################################################
use common;
use partition_table qw(:types);
-use partition_table_raw;
+use partition_table::raw;
use install_steps;
use install_interactive;
use install_any;
@@ -379,16 +379,16 @@ _("DiskDrake failed to read correctly the partition table.
Continue at your own risk!"));
if (arch() =~ /ppc/ && detect_devices::get_mac_generation =~ /NewWorld/) { #- need to make bootstrap part if NewWorld machine - thx Pixel ;^)
- if (defined $partition_table_mac::bootstrap_part) {
+ if (defined $partition_table::mac::bootstrap_part) {
#- 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;
- 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' });
+ 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;
+ 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' });
$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"));
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 0c1fd482c..7452a70cb 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -12,7 +12,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @important_types @important_types2 @fie
use common;
-use partition_table_raw;
+use partition_table::raw;
use detect_devices;
use log;
@@ -462,8 +462,8 @@ sub read_one($$) {
foreach ('empty', @parttype, 'lvm_PV', 'unknown') {
/unknown/ and die "unknown partition table format on disk " . $hd->{file};
eval {
- require("partition_table_$_.pm");
- bless $hd, "partition_table_$_";
+ require("partition_table/$_.pm");
+ bless $hd, "partition_table::$_";
($pt, $info) = $hd->read($sector);
log::l("found a $_ partition table on $hd->{file} at sector $sector");
};
@@ -486,7 +486,7 @@ sub read_one($$) {
sub read($;$) {
my ($hd, $clearall) = @_;
if ($clearall) {
- partition_table_raw::zero_MBR_and_dirty($hd);
+ partition_table::raw::zero_MBR_and_dirty($hd);
return 1;
}
my $pt = read_one($hd, 0) or return 0;
@@ -584,7 +584,7 @@ sub write {
if ($hd->{needKernelReread} && ref($hd->{needKernelReread}) eq 'ARRAY' && $::isStandalone) {
#- we've only been adding partitions. Try special add_partition (using BLKPG_ADD_PARTITION)
local *F;
- partition_table_raw::openit($hd, *F) or goto force_reread;
+ partition_table::raw::openit($hd, *F) or goto force_reread;
foreach (@{$hd->{needKernelReread}}) {
c::add_partition(fileno F, $_->{start}, $_->{size}, $_->{device} =~ /(\d+)$/)
diff --git a/perl-install/partition_table_bsd.pm b/perl-install/partition_table/bsd.pm
index aa9b9eb29..431d17f1f 100644
--- a/perl-install/partition_table_bsd.pm
+++ b/perl-install/partition_table/bsd.pm
@@ -1,13 +1,13 @@
-package partition_table_bsd; # $Id$
+package partition_table::bsd; # $Id$
use diagnostics;
use strict;
use vars qw(@ISA);
-@ISA = qw(partition_table_raw);
+@ISA = qw(partition_table::raw);
use common;
-use partition_table_raw;
+use partition_table::raw;
use partition_table;
use c;
@@ -62,7 +62,7 @@ sub read($$) {
my ($hd, $sector) = @_;
my $tmp;
- local *F; partition_table_raw::openit($hd, *F) or die "failed to open device";
+ local *F; partition_table::raw::openit($hd, *F) or die "failed to open device";
c::lseek_sector(fileno(F), $sector, $offset) or die "reading of partition in sector $sector failed";
sysread F, $tmp, psizeof($main_format) or die "error while reading partition table in sector $sector";
@@ -95,7 +95,7 @@ sub write($$$;$) {
my $file = "/tmp/partition_table_$hd->{device}";
open F, ">$file" or die "error opening test file $file";
} else {
- partition_table_raw::openit($hd, *F, 2) or die "error opening device $hd->{device} for writing";
+ partition_table::raw::openit($hd, *F, 2) or die "error opening device $hd->{device} for writing";
c::lseek_sector(fileno(F), $sector, $offset) or return 0;
}
diff --git a/perl-install/partition_table_dos.pm b/perl-install/partition_table/dos.pm
index ced50826f..a6ad4be76 100644
--- a/perl-install/partition_table_dos.pm
+++ b/perl-install/partition_table/dos.pm
@@ -1,13 +1,13 @@
-package partition_table_dos; # $Id$
+package partition_table::dos; # $Id$
use diagnostics;
use strict;
use vars qw(@ISA);
-@ISA = qw(partition_table_raw);
+@ISA = qw(partition_table::raw);
use common;
-use partition_table_raw;
+use partition_table::raw;
use partition_table;
use c;
@@ -52,7 +52,7 @@ sub read {
my ($hd, $sector) = @_;
my $tmp;
- local *F; partition_table_raw::openit($hd, *F) or die "failed to open device";
+ local *F; partition_table::raw::openit($hd, *F) or die "failed to open device";
c::lseek_sector(fileno(F), $sector, $offset) or die "reading of partition in sector $sector failed";
my @pt = map {
@@ -79,7 +79,7 @@ sub write($$$;$) {
my $file = "/tmp/partition_table_$hd->{device}";
open F, ">$file" or die "error opening test file $file";
} else {
- partition_table_raw::openit($hd, *F, 2) or die "error opening device $hd->{device} for writing";
+ partition_table::raw::openit($hd, *F, 2) or die "error opening device $hd->{device} for writing";
c::lseek_sector(fileno(F), $sector, $offset) or return 0;
}
diff --git a/perl-install/partition_table_empty.pm b/perl-install/partition_table/empty.pm
index 6c922ffb7..e90991684 100644
--- a/perl-install/partition_table_empty.pm
+++ b/perl-install/partition_table/empty.pm
@@ -1,4 +1,4 @@
-package partition_table_empty; # $Id$
+package partition_table::empty; # $Id$
#- this is a mainly dummy partition table. If we find it's empty, we just call -
#- zero_MBR which will take care of bless'ing us to the partition table type best
@@ -9,10 +9,10 @@ use diagnostics;
use strict;
use vars qw(@ISA);
-@ISA = qw(partition_table_raw);
+@ISA = qw(partition_table::raw);
use common;
-use partition_table_raw;
+use partition_table::raw;
use partition_table;
use c;
@@ -21,14 +21,14 @@ sub read($$) {
my ($hd, $sector) = @_;
my $tmp;
- local *F; partition_table_raw::openit($hd, *F) or die "failed to open device";
+ local *F; partition_table::raw::openit($hd, *F) or die "failed to open device";
c::lseek_sector(fileno(F), $sector, 0) or die "reading of partition in sector $sector failed";
#- check magic number
sysread F, $tmp, 512 or die "error reading magic number on disk $hd->{device}";
$tmp eq substr($tmp, 0, 1) x 512 or die "bad magic number on disk $hd->{device}";
- partition_table_raw::zero_MBR($hd);
+ partition_table::raw::zero_MBR($hd);
$hd->{primary}{raw};
}
diff --git a/perl-install/partition_table_gpt.pm b/perl-install/partition_table/gpt.pm
index d4c873851..01de8f8a7 100644
--- a/perl-install/partition_table_gpt.pm
+++ b/perl-install/partition_table/gpt.pm
@@ -1,14 +1,14 @@
-package partition_table_gpt; # $Id$
+package partition_table::gpt; # $Id$
use diagnostics;
use strict;
use vars qw(@ISA);
-@ISA = qw(partition_table_raw);
+@ISA = qw(partition_table::raw);
use common;
-use partition_table_raw;
-use partition_table_dos;
+use partition_table::raw;
+use partition_table::dos;
use partition_table;
use c;
@@ -142,13 +142,13 @@ sub read {
my ($hd, $sector) = @_;
my $tmp;
- my $l = partition_table_dos::read($hd, $sector);
+ my $l = partition_table::dos::read($hd, $sector);
my @l = grep { $_->{size} && $_->{type} && !partition_table::isExtended($_) } @$l;
@l == 1 or die "bad PMBR";
$l[0]{type} == 0xee or die "bad PMBR";
my $myLBA = $l[0]{start};
- local *F; partition_table_raw::openit($hd, *F) or die "failed to open device";
+ local *F; partition_table::raw::openit($hd, *F) or die "failed to open device";
my $info1 = eval { read_header($myLBA, *F) };
my $info2 = eval { read_header($info1->{alternateLBA} || $l[0]{start} + $l[0]{size} - 1, *F) }; #- what about using $hd->{totalsectors} ???
my $info = $info1 || { %$info2, myLBA => $info2->{alternateLBA}, alternateLBA => $info2->{myLBA}, partitionEntriesLBA => $info2->{alternateLBA} + 1 } or die;
@@ -185,13 +185,13 @@ sub write {
{
# write the PMBR
- my $pmbr = partition_table_dos::clear_raw();
+ my $pmbr = partition_table::dos::clear_raw();
$pmbr->{raw}[0] = { type => 0xee, local_start => $info->{myLBA}, size => $info->{alternateLBA} - $info->{myLBA} + 1 };
- partition_table_dos::write($hd, $sector, $pmbr->{raw});
+ partition_table::dos::write($hd, $sector, $pmbr->{raw});
}
local *F;
- partition_table_raw::openit($hd, *F, 2) or die "error opening device $hd->{device} for writing";
+ partition_table::raw::openit($hd, *F, 2) or die "error opening device $hd->{device} for writing";
c::lseek_sector(fileno(F), $info->{myLBA}, 0) or return 0;
#- pad with 0's
diff --git a/perl-install/partition_table_lvm_PV.pm b/perl-install/partition_table/lvm_PV.pm
index f9362a9e5..4a55d3810 100644
--- a/perl-install/partition_table_lvm_PV.pm
+++ b/perl-install/partition_table/lvm_PV.pm
@@ -1,11 +1,11 @@
-package partition_table_lvm; # $Id$
+package partition_table::lvm; # $Id$
use diagnostics;
use strict;
-our @ISA = qw(partition_table_raw);
+our @ISA = qw(partition_table::raw);
-use partition_table_raw;
+use partition_table::raw;
use c;
my $magic = "HM\1\0";
@@ -23,7 +23,7 @@ my $offset = 0;
sub read {
my ($hd, $sector) = @_;
- local *F; partition_table_raw::openit($hd, *F) or die "failed to open device";
+ local *F; partition_table::raw::openit($hd, *F) or die "failed to open device";
c::lseek_sector(fileno(F), $sector, $offset) or die "reading of partition in sector $sector failed";
sysread F, my $tmp, length $magic or die "error reading magic number on disk $hd->{file}";
diff --git a/perl-install/partition_table_mac.pm b/perl-install/partition_table/mac.pm
index 4a094e92b..89fb9ceaf 100644
--- a/perl-install/partition_table_mac.pm
+++ b/perl-install/partition_table/mac.pm
@@ -1,13 +1,13 @@
-package partition_table_mac; # $Id$
+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);
-@ISA = qw(partition_table_raw);
+@ISA = qw(partition_table::raw);
use common;
-use partition_table_raw;
+use partition_table::raw;
use partition_table;
use c;
@@ -100,7 +100,7 @@ sub read($$) {
my ($hd, $sector) = @_;
my $tmp;
- local *F; partition_table_raw::openit($hd, *F) or die "failed to open device";
+ local *F; partition_table::raw::openit($hd, *F) or die "failed to open device";
c::lseek_sector(fileno(F), $sector, 0) or die "reading of partition in sector $sector failed";
sysread F, $tmp, psizeof($bz_format) or die "error while reading bz \(Block Zero\) in sector $sector";
@@ -203,7 +203,7 @@ sub write($$$;$) {
my $file = "/tmp/partition_table_$hd->{device}";
open F, ">$file" or die "error opening test file $file";
} else {
- partition_table_raw::openit($hd, *F, 2) or die "error opening device $hd->{device} for writing";
+ partition_table::raw::openit($hd, *F, 2) or die "error opening device $hd->{device} for writing";
c::lseek_sector(fileno(F), $sector, 0) or return 0;
}
@@ -301,7 +301,7 @@ sub write($$$;$) {
$_->{pFlags} = 0x33;
$_->{isBoot} = 1;
log::l("writing a bootstrap at /dev/$_->{device}");
- $install_steps_interactive::new_bootstrap = 1 if !(defined $partition_table_mac::bootstrap_part);
+ $install_steps_interactive::new_bootstrap = 1 if !(defined $partition_table::mac::bootstrap_part);
$bootstrap_part = "/dev/" . $_->{device};
} elsif ($_->{type} == 0x82) {
$_->{pType} = "Apple_UNIX_SVR2";
diff --git a/perl-install/partition_table_raw.pm b/perl-install/partition_table/raw.pm
index 20a883b11..3be68fe56 100644
--- a/perl-install/partition_table_raw.pm
+++ b/perl-install/partition_table/raw.pm
@@ -1,4 +1,4 @@
-package partition_table_raw; # $Id$
+package partition_table::raw; # $Id$
use diagnostics;
use strict;
@@ -145,8 +145,8 @@ sub zero_MBR {
my $type = arch() =~ /ia64/ ? 'gpt' : arch() eq "alpha" ? "bsd" : arch() =~ /^sparc/ ? "sun" : arch() eq "ppc" ? "mac" : "dos";
#- override standard mac type on PPC for IBM machines to dos
$type = "dos" if (arch() =~ /ppc/ && detect_devices::get_mac_model() =~ /^IBM/);
- require("partition_table_$type.pm");
- bless $hd, "partition_table_$type";
+ require("partition_table/$type.pm");
+ bless $hd, "partition_table::$type";
$hd->{primary} = $hd->clear_raw();
delete $hd->{extended};
}
diff --git a/perl-install/partition_table_sun.pm b/perl-install/partition_table/sun.pm
index e0cc05265..6944130dc 100644
--- a/perl-install/partition_table_sun.pm
+++ b/perl-install/partition_table/sun.pm
@@ -1,13 +1,13 @@
-package partition_table_sun; # $Id$
+package partition_table::sun; # $Id$
use diagnostics;
use strict;
use vars qw(@ISA);
-@ISA = qw(partition_table_raw);
+@ISA = qw(partition_table::raw);
use common;
-use partition_table_raw;
+use partition_table::raw;
use partition_table;
use c;
@@ -75,7 +75,7 @@ sub read($$) {
my ($hd, $sector) = @_;
my $tmp;
- local *F; partition_table_raw::openit($hd, *F) or die "failed to open device";
+ local *F; partition_table::raw::openit($hd, *F) or die "failed to open device";
c::lseek_sector(fileno(F), $sector, $offset) or die "reading of partition in sector $sector failed";
sysread F, $tmp, psizeof($main_format) or die "error while reading partition table in sector $sector";
@@ -125,7 +125,7 @@ sub write($$$;$) {
my $file = "/tmp/partition_table_$hd->{device}";
open F, ">$file" or die "error opening test file $file";
} else {
- partition_table_raw::openit($hd, *F, 2) or die "error opening device $hd->{device} for writing";
+ partition_table::raw::openit($hd, *F, 2) or die "error opening device $hd->{device} for writing";
c::lseek_sector(fileno(F), $sector, $offset) or return 0;
}
diff --git a/perl-install/standalone.pm b/perl-install/standalone.pm
index 077bbba19..7d405ce5a 100644
--- a/perl-install/standalone.pm
+++ b/perl-install/standalone.pm
@@ -69,7 +69,7 @@ sub explanations { c::syslog(c::LOG_INFO()|c::LOG_LOCAL1(), "@_") }
@common_functs = qw(renamef linkf symlinkf output substInFile mkdir_p rm_rf cp_af touch setVarsInSh setVarsInCsh update_gnomekderc);
@builtin_functs = qw(chmod chown unlink link symlink rename system);
-@drakx_modules = qw(Xconfig Xconfigurator Xconfigurator_consts any bootloader bootlook c class_discard commands crypto detect_devices devices diskdrake diskdrake::hd_gtk diskdrake::interactive diskdrake::removable diskdrake::removable_gtk diskdrake::smbnfs_gtk fs fsedit http keyboard lang log loopback lvm modparm modules mouse my_gtk network network::adsl network::ethernet network::isdn_consts network::isdn network::modem network::netconnect network::network network::nfs network::smb network::tools partition_table partition_table_bsd partition_table_dos partition_table_empty partition_table_gpt partition_table_mac partition_table_raw partition_table_sun printer printerdrake proxy raid run_program scanner services steps swap timezone tinyfirewall);
+@drakx_modules = qw(Xconfig Xconfigurator Xconfigurator_consts any bootloader bootlook c class_discard commands crypto detect_devices devices diskdrake diskdrake::hd_gtk diskdrake::interactive diskdrake::removable diskdrake::removable_gtk diskdrake::smbnfs_gtk fs fsedit http keyboard lang log loopback lvm modparm modules mouse my_gtk network network::adsl network::ethernet network::isdn_consts network::isdn network::modem network::netconnect network::network network::nfs network::smb network::tools partition_table partition_table_bsd partition_table::dos partition_table::empty partition_table::gpt partition_table::mac partition_table::raw partition_table::sun printer printerdrake proxy raid run_program scanner services steps swap timezone tinyfirewall);
sub import {