[BusyBox 0000752]: ifconfig error reporting missing; bogus exit status

bugs at busybox.net bugs at busybox.net
Tue Feb 21 09:37:09 UTC 2006


The following issue has been SUBMITTED. 
====================================================================== 
http://busybox.net/bugs/view.php?id=752 
====================================================================== 
Reported By:                schweikhardt
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   752
Category:                   Other
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             02-21-2006 01:37 PST
Last Modified:              02-21-2006 01:37 PST
====================================================================== 
Summary:                    ifconfig error reporting missing; bogus exit status
Description: 
The ifconfig utility silently ignores certain erroneous invocations.
On the other hand, it reports certain successful invocations with a
non-zero exit status. This makes ifconfig pretty much unsusable in shell
scripts using "set -e" as well as Makefiles.

How to reproduce on BusyBox v1.00-rc3 (2004.10.07-07:15+0000) multi-call
binary:

# ifconfig lo inet 127.0.0.1/8   <--invalid syntax
#  (no error message, exit status 2)


# ifconfig lo inet 127.0.0.1          
# echo $?
1    # What's wrong? Should be 0.
# ifconfig eth2 inet 10.0.0.1 netmask 0xFF000000
# echo $?
1    # What's wrong? Should be 0.
  
Could someone please review all the places where ifconfig does exit() or
return from main() for consistency? Ideally 0 and 1 should be the only two
exit status values ever seen, just like for many POSIX utilities. Thanks a
bunch!

====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
02-21-06 01:37  schweikhardt   New Issue                                    
02-21-06 01:37  schweikhardt   Status                   new => assigned     
02-21-06 01:37  schweikhardt   Assigned To               => BusyBox         
======================================================================




More information about the busybox-cvs mailing list