Skip to content

Ifconfig is not always in /sbin/ifconfigΒ #24

@hlein

Description

@hlein

Some years ago upstream net-tools changed ifconfig to live in /bin: ecki/net-tools@36b541c

Of course, many distros continue to put it in /sbin/, but not all.

Moreover, in some distros such as RHEL/CentOS since at least 7.x, ifconfig is not even included in a base install, only ip and the like.

I've got some simple hacks to osflags and tun.cpp to handle alternate ifconfig paths at compile time, much like ac0d27e#diff-2fc819de3e4f16d2b86d4cc7bcb7042e739f76193d7de454488cb4b33fea848d for android support.

But I think better still would be some runtime selection/fallback. One could easily compile hans on a CentOS 7 system that has optional ifconfig installed, then bring the binary to a system that has only ip and find a nasty surprise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions