Package: fusioninventory-agent
Version: 2.0.6-2
Severity: important

On Linux/powerpc, when lauching an inventory, the agent gets blocked by a 
'fdisk -s' command which never ends when executed on the dvd drive
because it's waiting for user input

Excerpt of ps faux : 

fab       6445  0.0  0.0   7940  4732 pts/3    Ss   12:19   0:00  \_ /bin/bash
root      8266  0.0  0.0  12176  3684 pts/3    SL   12:58   0:00  |   \_ su -
root      8278  0.0  0.0   5384  2028 pts/3    S    12:59   0:00  |       \_ -su
root     12452  0.3  0.2  21760 16440 pts/3    S+   13:06   0:00  |           
\_ /usr/bin/perl /usr/local/bin/fusioninventory-agent --debug
root     12456  0.0  0.0   2036   604 pts/3    S+   13:06   0:00  |             
  \_ sh -c /usr/bin/perl -MFusionInventory::Agent::Task::Inventory -e 
'FusionInventory::Agent::Task::Inventory::main();' -- 
/var/lib/ocsinventory-agent/http:
root     12457  0.4  0.2  15432 12184 pts/3    S+   13:06   0:00  |             
      \_ /usr/bin/perl -MFusionInventory::Agent::Task::Inventory -e 
FusionInventory::Agent::Task::Inventory::main(); -- 
/var/lib/ocsinventory-agent/http:__gl
root     12459  0.0  0.0   2036   608 pts/3    S+   13:06   0:00  |             
          \_ sh -c fdisk -s /dev/hda 2>/dev/null
root     12460  0.0  0.0   4092  1616 pts/3    S+   13:06   0:00  |             
              \_ fdisk -s /dev/hda

What is the problem with this command :

# fdisk -s /dev/hda
Error: Error opening /dev/hda: Aucun medium trouvé                        
   r   Retry                                                              
   c   Cancel
c
Unable to open /dev/hda

Version of fdisk used :

# fdisk -v
GNU Fdisk 1.2.4

Adding this option of fdisk avoids waiting for user input :
  -p, --script                  never prompts for user intervention

Here is the patch i applied to avoid the issue, but it may be not portable to 
other architectures :

------
diff /var/backups/Storages.pm.old 
/usr/share/perl5/FusionInventory/Agent/Task/Inventory/OS/Linux/Storages.pm
60c60
chomp ($cap = `fdisk -s /dev/$dev 2>/dev/null`); #requires permissions on 
/dev/$dev
---
chomp ($cap = `fdisk -p -s /dev/$dev 2>/dev/null`); #requires permissions on 
/dev/$dev
------ 

see : http://forge.fusioninventory.org/issues/420c


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (900, 'unstable'), (900, 'testing'), (500, 'experimental')
Architecture: powerpc (ppc64)

Kernel: Linux 2.6.30-1-powerpc64 (SMP w/2 CPU cores)
Locale: LANG=fr_BE.UTF-8, LC_CTYPE=fr_BE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages fusioninventory-agent depends on:
ii  libcompress-zlib-perl        2.024-1     Transitional dummy package for Com
ii  libio-compress-perl [libcomp 2.024-1     bundle of IO::Compress modules
ii  libnet-ip-perl               1.25-2      Perl extension for manipulating IP
ii  libnet-ssleay-perl           1.36-1      Perl module for Secure Sockets Lay
ii  libproc-daemon-perl          0.03-2      Run Perl program as a daemon proce
ii  libwww-perl                  5.837-1     simple and consistent interface to
ii  libxml-simple-perl           2.18-3      Perl module for reading and writin
ii  perl [libcompress-zlib-perl] 5.10.1-15   Larry Wall's Practical Extraction 
ii  ucf                          3.0025+nmu1 Update Configuration File: preserv

fusioninventory-agent recommends no packages.

Versions of packages fusioninventory-agent suggests:
ii  nmap                    5.21-1           The Network Mapper
ii  pciutils                1:3.1.7-5        Linux PCI Utilities
ii  read-edid               2.0.0-3.1        hardware information-gathering too
ii  smartmontools           5.39.1+svn3124-1 control and monitor storage system

-- Configuration Files:
/etc/fusioninventory/agent.cfg [Errno 13] Permission non accordée: 
u'/etc/fusioninventory/agent.cfg'

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to