Bug 63109

Summary: getpartinfo fails to collect actual partition data
Product: [Retired] Red Hat Linux Reporter: Ben Levenson <benl>
Component: sysreportAssignee: Than Ngo <than>
Status: CLOSED ERRATA QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-04-10 22:26:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 61901    

Description Ben Levenson 2002-04-10 04:20:27 UTC
Description of Problem:
if you can parse this, here is the output of 'sh -x /usr/bin/sysreport'
<snip>
  + STATUS=Collecting disk partition information:
  + getpartinfo
  ++ /bin/cat /proc/partitions
  ++ /bin/awk '{print $4}'
  ++ /bin/grep /
  ++ /bin/egrep -v 'p[0123456789]$'
  /bin/egrep: /root/grep: No such file or directory
  /bin/egrep: exec: /root/grep: cannot execute: No such file or directory
  ++ /bin/egrep -v '^major|^$'
  /bin/egrep: /root/grep: No such file or directory
  /bin/egrep: exec: /root/grep: cannot execute: No such file or directory
  + raiddevs=
  ++ /bin/cat /proc/partitions
  ++ /bin/egrep -v '^major|^$'
  /bin/egrep: /root/grep: No such file or directory
  /bin/egrep: exec: /root/grep: cannot execute: No such file or directory
  ++ /bin/awk '{print $4}'
  ++ /bin/grep -v /
  ++ /bin/egrep -v '[0123456789]$'
  /bin/egrep: /root/grep: No such file or directory
  /bin/egrep: exec: /root/grep: cannot execute: No such file or directory
  + disks=
  + echo 'fdisk -l output'
  + STATUS=Checking mounted file systems:
  + catifexec /bin/mount
  + echo -n Checking mounted file systems:
<snip>
 
It looks like a scope issue w/ "disks" and "raiddevs". If those variables are
defined outside of the getpartinfo() function, then everything works as 
expected. (ATM, it is too late for me to come up with a more graceful
solution....)

Version-Release number of selected component (if applicable):
sysreport-1.3-1

How Reproducible:
100%

Steps to Reproduce:
1. run sysinfo 
2. check contents of fdisk-l 
3. 

Actual Results:
$cat /tmp/initials.23431/fdisk-l
fdisk -l output
$

Expected Results:
actual output from 'fdisk -l /dev/hda'

Comment 1 Ngo Than 2002-04-12 21:50:02 UTC
it's fixed in 1.3-2

Comment 2 John Flanagan 2004-04-22 01:09:13 UTC
An errata has been issued which should help the problem described in this bug report. 
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen 
this bug report if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-094.html