summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-06-28 16:50:39 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-06-28 16:50:39 +0000
commitb6a8fceafd44f7354efc7b7b27db48204e051317 (patch)
treee579bbc5441d9905f91880e5d68440a70802b2f4 /perl-install
parentf02e76ad7ed01ce6f02ed576c13dd74fc69cdef6 (diff)
downloaddrakx-backup-do-not-use-b6a8fceafd44f7354efc7b7b27db48204e051317.tar
drakx-backup-do-not-use-b6a8fceafd44f7354efc7b7b27db48204e051317.tar.gz
drakx-backup-do-not-use-b6a8fceafd44f7354efc7b7b27db48204e051317.tar.bz2
drakx-backup-do-not-use-b6a8fceafd44f7354efc7b7b27db48204e051317.tar.xz
drakx-backup-do-not-use-b6a8fceafd44f7354efc7b7b27db48204e051317.zip
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/commands.pm47
-rw-r--r--perl-install/modules.pm8
-rw-r--r--perl-install/partition_table.pm2
-rwxr-xr-xperl-install/standalone/drakboot2
4 files changed, 45 insertions, 14 deletions
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index c6a784c93..467cdfa4b 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -84,7 +84,7 @@ sub mount {
sub umount {
@_ == 1 or die "umount expects a single argument\n";
- require 'fs.pm';
+ require fs;
fs::umount($_[0]);
}
@@ -108,10 +108,10 @@ sub mkdir_ {
sub mknod {
if (@_ == 1) {
- require 'devices.pm';
+ require devices;
eval { devices::make($_[0]) }; $@ and die "mknod: failed to create $_[0]\n";
} elsif (@_ == 4) {
- require 'c.pm';
+ require c;
my $mode = $ {{"b" => c::S_IFBLK(), "c" => c::S_IFCHR()}}{$_[1]} or die "unknown node type $_[1]\n";
syscall_('mknod', my $a = $_[0], $mode | 0600, makedev($_[2], $_[3])) or die "mknod failed: $!\n";
} else { die "usage: mknod <path> [b|c] <major> <minor> or mknod <path>\n"; }
@@ -361,7 +361,7 @@ sub hexdump {
sub more {
@ARGV = @_;
- require 'devices.pm';
+ require devices;
my $tty = devices::make('tty');
local *IN; open IN, "<$tty" or die "can't open $tty\n";
my $n = 0; while (<>) {
@@ -415,7 +415,7 @@ sub insmod {
$h || @_ == 0 and die "usage: insmod <module> [options]\n";
my $f = local $_ = shift;
- require 'run_program.pm';
+ require run_program;
#- try to install the module if it exist else extract it from archive.
#- needed for cardmgr.
@@ -442,7 +442,7 @@ sub modprobe {
my ($h) = getopts(\@_, qw(h));
$h || @_ == 0 and die "usage: modprobe <module> [options]\n";
my $name = shift;
- require 'modules.pm';
+ require modules;
modules::load_deps("/modules/modules.dep");
modules::load($name, '', @_);
}
@@ -514,11 +514,11 @@ sub kill {
}
sub lspci {
- require 'pci_probing/main.pm';
+ require pci_probing::main;
print join "\n", pci_probing::main::list (), '';
}
sub lssbus {
- require 'sbus_probing/main.pm';
+ require sbus_probing::main;
print join "\n", sbus_probing::main::list (), '';
}
sub dmesg { print cat_("/tmp/syslog"); }
@@ -557,7 +557,7 @@ sub install_cpio($$;@) {
eval { rm("-r", $dir) };
mkdir $dir, 0755;
- require 'run_program.pm';
+ require run_program;
my $more = join " ", map { $_ && "$_ $_/*" } @more;
run_program::run("cd $dir ; bzip2 -cd $cpio | cpio -id $name $name/* $more");
@@ -565,6 +565,35 @@ sub install_cpio($$;@) {
"$dir/$name";
}
+sub bug {
+ my ($h) = getopts(\@_, "h");
+ $h and die "usage: bug\nput file report.bug on fat formatted floppy\n";
+ mount "/dev/fd0", "/fd0";
+
+ sub header { "
+********************************************************************************
+* $_[0]
+********************************************************************************";
+ }
+ require pci_probing::main;
+
+ local $\ = "\n";
+ output "/fd0/report.bug", map { chomp; $_ }
+ header("lspci"), pci_probing::main::list(),
+ header("pci_devices"), cat_("/proc/bus/pci/devices"),
+ header("fdisk"), `fdisk -l`,
+ header("scsi"), cat_("/proc/scsi/scsi"),
+ header("lsmod"), cat_("/proc/modules"),
+ header("cmdline"), cat_("/proc/cmdline"),
+ header("cpuinfo"), cat_("/proc/cpuinfo"),
+ header("syslog"), cat_("/tmp/syslog"),
+ header("ddebug.log"), cat_("/tmp/ddebug.log"),
+ header("install.log"), cat_("/mnt/root/install.log"),
+ ;
+ umount "/fd0";
+ sync;
+}
+
#-######################################################################################
#- Wonderful perl :(
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 5925f9df5..05a1bb8d6 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -92,6 +92,8 @@ arch() =~ /^sparc/ ? (
"af_packet" => "packet socket",
"nfs" => "Network File System (nfs)",
"lockd" => "lockd",
+ "parport" => "parport",
+ "parport_pc" => "parport_pc",
"sunrpc" => "sunrpc",
}],
[ 'scsi', {
@@ -488,9 +490,9 @@ sub read_conf($;$) {
sub write_conf {
my ($prefix) = @_;
- #- my $file = "$prefix/etc/modules.conf"; TODO RESTORE FOR AFTER 7.1
- #- rename "$prefix/etc/conf.modules", $file; #- make the switch to new name if needed
- my $file = "$prefix/etc/conf.modules";
+
+ my $file = "$prefix/etc/modules.conf";
+ rename "$prefix/etc/conf.modules", $file; #- make the switch to new name if needed
#- remove the post-install supermount stuff. We may have to add some more
substInFile { $_ = '' if /^post-install supermount/ } $file;
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 63a7d632d..0ea3fad13 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -316,7 +316,7 @@ sub adjust_main_extended($) {
my $start = round_down($l->{normal}{start} - 1, $hd->{geom}{sectors});
my $end = $l->{normal}{start} + $l->{normal}{size};
my $only_linux = 1;
- foreach (map $_->{normal}, @l) {
+ foreach (map $_->{normal}, $l, @l) {
$start = min($start, $_->{start});
$end = max($end, $_->{start} + $_->{size});
$only_linux &&= isTrueFS($_) || isSwap($_);
diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot
index 912869938..a1c252f3c 100755
--- a/perl-install/standalone/drakboot
+++ b/perl-install/standalone/drakboot
@@ -32,7 +32,7 @@ while (my ($k, $v) = each %l) {
foreach (@$v) {
-x $_ and $l{$k} = $_, last;
}
- -x $l{$k} or delete $l{$_};
+ -x $l{$k} or delete $l{$k};
}
if ($ENV{DISPLAY} && c::Xtest($ENV{DISPLAY})) {