From 72f50dd4f1f871dd01cb0701f1de2694d5714a8f Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 8 Dec 2000 14:16:48 +0000 Subject: report_bug: created, returns a string --- perl-install/commands.pm | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'perl-install') diff --git a/perl-install/commands.pm b/perl-install/commands.pm index e2d0f4c0d..46246aa2b 100644 --- a/perl-install/commands.pm +++ b/perl-install/commands.pm @@ -560,21 +560,14 @@ 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"; - - require detect_devices; - mount devices::make(detect_devices::floppy()), "/fd0"; - +sub report_bug { sub header { " ******************************************************************************** * $_[0] ********************************************************************************"; } - local $\ = "\n"; - output "/fd0/report.bug", map { chomp; $_ } + join '', map { chomp; "$_\n" } header("lspci"), detect_devices::stringlist(), header("pci_devices"), cat_("/proc/bus/pci/devices"), header("fdisk"), `fdisk -l`, @@ -590,6 +583,16 @@ sub bug { header("ddebug.log"), cat_("/tmp/ddebug.log"), header("install.log"), cat_("/mnt/root/install.log"), ; +} + +sub bug { + my ($h) = getopts(\@_, "h"); + $h and die "usage: bug\nput file report.bug on fat formatted floppy\n"; + + require detect_devices; + mount devices::make(detect_devices::floppy()), "/fd0"; + + output "/fd0/report.bug", report_bug(); umount "/fd0"; sync; } -- cgit v1.2.1