summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-06-27 14:26:54 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-06-27 14:26:54 +0000
commit20e17418ef5bba9d5e90430ce24a0893deb4c7a6 (patch)
tree43957a5fbf9ddd8b5cad5050d4c0f920fa513728
parentcb9b426b5a1d5bba90719982e9de077e38b887f8 (diff)
downloaddrakx-backup-do-not-use-20e17418ef5bba9d5e90430ce24a0893deb4c7a6.tar
drakx-backup-do-not-use-20e17418ef5bba9d5e90430ce24a0893deb4c7a6.tar.gz
drakx-backup-do-not-use-20e17418ef5bba9d5e90430ce24a0893deb4c7a6.tar.bz2
drakx-backup-do-not-use-20e17418ef5bba9d5e90430ce24a0893deb4c7a6.tar.xz
drakx-backup-do-not-use-20e17418ef5bba9d5e90430ce24a0893deb4c7a6.zip
have the drakx "bug" command available in standalone via "drakbug_report"
-rw-r--r--perl-install/any.pm28
-rw-r--r--perl-install/install_any.pm28
-rwxr-xr-xperl-install/standalone/drakbug_report7
3 files changed, 37 insertions, 26 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 2fe5e0eca..b429ac3e4 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -800,4 +800,32 @@ sub runlevel {
sub to_utf8 { c::iconv($_[0], $lang::charset || 'ISO-8859-1', "utf-8") }
+sub report_bug {
+ my ($prefix, @other) = @_;
+
+ sub header { "
+********************************************************************************
+* $_[0]
+********************************************************************************";
+ }
+
+ join '', map { chomp; "$_\n" }
+ header("lspci"), detect_devices::stringlist(),
+ header("pci_devices"), cat_("/proc/bus/pci/devices"),
+ header("fdisk"), arch() =~ /ppc/ ? `$ENV{LD_LOADER} pdisk -l` : `$ENV{LD_LOADER} fdisk -l`,
+ header("scsi"), cat_("/proc/scsi/scsi"),
+ header("lsmod"), cat_("/proc/modules"),
+ header("cmdline"), cat_("/proc/cmdline"),
+ header("pcmcia: stab"), cat_("/var/run/stab"),
+ header("usb"), cat_("/proc/bus/usb/devices"),
+ header("partitions"), cat_("/proc/partitions"),
+ header("cpuinfo"), cat_("/proc/cpuinfo"),
+ header("syslog"), cat_("/tmp/syslog"),
+ header("ddcxinfos"), `$ENV{LD_LOADER} ddcxinfos`,
+ header("ddebug.log"), cat_("/tmp/ddebug.log"),
+ header("install.log"), cat_("$prefix/root/install.log"),
+ header("fstab"), cat_("$prefix/etc/fstab"),
+ map_index { even($::i) ? header($_) : $_ } @other;
+}
+
1;
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 7ded141fa..6fb0f38d2 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -600,31 +600,7 @@ sub auto_inst_file() { ($::g_auto_install ? "/tmp" : "$::o->{prefix}/root") . "/
sub report_bug {
my ($prefix) = @_;
-
- sub header { "
-********************************************************************************
-* $_[0]
-********************************************************************************";
- }
-
- join '', map { chomp; "$_\n" }
- header("lspci"), detect_devices::stringlist(),
- header("pci_devices"), cat_("/proc/bus/pci/devices"),
- header("fdisk"), arch() =~ /ppc/ ? `$ENV{LD_LOADER} pdisk -l` : `$ENV{LD_LOADER} fdisk -l`,
- header("scsi"), cat_("/proc/scsi/scsi"),
- header("lsmod"), cat_("/proc/modules"),
- header("cmdline"), cat_("/proc/cmdline"),
- header("pcmcia: stab"), cat_("/var/run/stab"),
- header("usb"), cat_("/proc/bus/usb/devices"),
- header("partitions"), cat_("/proc/partitions"),
- header("cpuinfo"), cat_("/proc/cpuinfo"),
- header("syslog"), cat_("/tmp/syslog"),
- header("ddcxinfos"), `$ENV{LD_LOADER} ddcxinfos`,
- header("ddebug.log"), cat_("/tmp/ddebug.log"),
- header("install.log"), cat_("$prefix/root/install.log"),
- header("fstab"), cat_("$prefix/etc/fstab"),
- header("auto_inst"), g_auto_install(),
- ;
+ any::report_bug($prefix, 'auto_inst' => g_auto_install());
}
sub g_auto_install {
@@ -720,7 +696,7 @@ sub loadO {
no strict;
eval <$fh>;
close $fh;
- $@ and log::l("Bad kickstart file $f (failed $@)");
+ $@ and die;
}
add2hash_($o ||= {}, $O);
}
diff --git a/perl-install/standalone/drakbug_report b/perl-install/standalone/drakbug_report
new file mode 100755
index 000000000..02eabebdf
--- /dev/null
+++ b/perl-install/standalone/drakbug_report
@@ -0,0 +1,7 @@
+#!/usr/bin/perl
+
+use lib qw(/usr/lib/libDrakX);
+
+use any;
+
+print any::report_bug();