Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Sep 2015 19:22:14 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 203062] ifconfig always has exit status 0
Message-ID:  <bug-203062-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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@FreeBSD.org
          Reporter: kp@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-203062-8>