Skip to content

Not compatible with Ubuntu #3

@rohanc

Description

@rohanc

As hinted in your blog, the ifconfig output is different across different Linux distributions. I found that aliaser didn't work for me on Ubuntu 16.04.2 LTS because the regex it uses to find the MAC address won't work on that platform.

To fix the problem, I put this line in the mac-grab function instead:
MAC_ADDR=$(cat /sys/class/net/eth0/address)

As suggested by Dave on stackoverflow, using the sysfs way is perhaps the cleanest. I imagine this will work on both Redhat and Debian now.

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