[linux-lvm] exit code of vgscan when everything is ok

Arkadiusz Miskiewicz arekm at pld-linux.org
Tue May 18 10:52:32 UTC 2004


Hi,

[root at arm misiek]# rpm -q lvm2
lvm2-2.00.15-1
[root at arm misiek]# /sbin/vgscan
  Reading all physical volumes.  This may take a while...
  No volume groups found
[root at arm misiek]# echo $?
5

./lib/commands/errors.h:#define ECMD_FAILED             5

why it returns non-zero code? When there is no volume groups then it's normal 
to find zero of them and it's not failure.

This causes problems in init scripts.
-- 
Arkadiusz Miśkiewicz     CS at FoE, Wroclaw University of Technology
arekm.pld-linux.org, 1024/3DB19BBD, JID: arekm.jabber.org, PLD/Linux




More information about the linux-lvm mailing list