Skip to content

permit hostname for mac addr argument, resolved via /etc/ethers #12

@jmtd

Description

@jmtd

It would be nice if we could specify a hostname in place of the MAC address argument, and for wakeonlan to attempt to look this up via nss/nsswitch/the ethers db (e.g. /etc/ethers).

Note that this would be to resolve a hostname to a MAC address, not to specify an IP for the WOL packet.

Examples

$ getent ethers coil
e0:4f:43:e6:2b:36 coil
$ wakeonlan $(getent ethers coil | awk '{ print $1 }')
Sending magic packet to 255.255.255.255:9 with e0:4f:43:e6:2b:36

getent(1) implies that the libc function to do this correctly is ether_hostton.

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