[Bug 203062] ifconfig always has exit status 0

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Sep 12 19:22:14 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203062

            Bug ID: 203062
           Summary: ifconfig always has exit status 0
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: kp at freebsd.org

ifconfig doesn't return errors if the ioctl() fails.
It prints the error, but always does exit(0).
This makes it annoying to use in scripts.

For example, when trying to rename an interface to conflict with an existing
interface:
% sudo ifconfig lo0 name vtnet0 ; echo $?
ifconfig: ioctl (set name): File exists
0

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list