diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-03-03 10:28:17 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-03-03 10:28:17 +0000 |
commit | d99093fb4bb5652015c06274d64083daa2439e4f (patch) | |
tree | cf61513204d97974179580065e85df5c8009087c /net-misc/wakeonlan | |
parent | 463397cf1e064185110fe57c568d73f99a06f5d1 (diff) |
gentoo resync : 03.03.2021
Diffstat (limited to 'net-misc/wakeonlan')
-rw-r--r-- | net-misc/wakeonlan/Manifest | 1 | ||||
-rw-r--r-- | net-misc/wakeonlan/files/wakeonlan-0.41-ethers-lookup.patch | 90 |
2 files changed, 0 insertions, 91 deletions
diff --git a/net-misc/wakeonlan/Manifest b/net-misc/wakeonlan/Manifest index d8cb201d1b08..8a45f865f6b0 100644 --- a/net-misc/wakeonlan/Manifest +++ b/net-misc/wakeonlan/Manifest @@ -1,5 +1,4 @@ AUX wakeonlan-0.41-ethers-lookup-r1.patch 2287 BLAKE2B 95bacd277caff21b056f3a8c159808594dce0fc60c735757148a315c87d02d110695b343eaffa28b067668b2f874ad1f88516fe9cee4f98621ecbb15396b1b4f SHA512 52a0b30aa8a2beee0056112b49cfe6ef6021f682f7ba1ba38173d227f5e103f34fdded8c61b7b399cc548ca5e182b47d320af6dffe617673aa873f08c20e1bc4 -AUX wakeonlan-0.41-ethers-lookup.patch 2284 BLAKE2B fa45175d623a3e4cfb5b79ec4f499401b798a8fc3e4dd10a8d580f02083334db32ff5f925defb72b71d6ceceee3017d3bf9a4c2ef2559c9eb8e9d92e6e25a63e SHA512 39cdee0f2732f4d09822cbb82e4674e966b1648fbdd84b4a8adaf3b734ea2e8e4b5f0d535f7d70dbf3608c23ddc0761de9c5892a5c6c73613f322dc4e71db3d2 DIST wakeonlan-0.41.tar.gz 6028 BLAKE2B d560c7dd830daf596ffd7d797d1908d1fc90d20c6861a0e341b20eb38137b809fe1a78819f9ca729fa06f88285cfb22d0719092bed1d49d9763a7e2bb8a986bf SHA512 192ed2ad157e3f5af01632b8f2b727e232448e5a9bff6aec25298fa9913ec38f1036b665b141b5299994c88b1941d9896b6eaa92cfdb44d65db3628f50e3824f EBUILD wakeonlan-0.41-r4.ebuild 620 BLAKE2B d143f032a58a7eee805b2172bd7234f24edb2a59ef73cc5dd0a2c2f79666a4e5553a92047bad51df89116dcd40de1d1dd143f309fbefe175c7516593f7af4e3c SHA512 5d61763a8596a4a94bf3ed2c849a2fac5b9ecb9f0ae7df37301f92c94fc478afe3132c02cf3b09c26b075c0d092f1c644f95f223fb2f9dabade8beb4768a0573 MISC metadata.xml 168 BLAKE2B 5f277cc66dbafa7e7985433f84b0f9a656a176a9b901862e2a8353ca2d4526797dded9696e835b9696c7f72324e94959cfb5a22de49a7e3e61604153886037ab SHA512 00eec08786156434460f5ed77b647579546cf1a86341a4f2c9c9c84326468c2c21dc5101c4277103b19266bb6f788823f4ddf3b9d044da26326d79bf2ac9a274 diff --git a/net-misc/wakeonlan/files/wakeonlan-0.41-ethers-lookup.patch b/net-misc/wakeonlan/files/wakeonlan-0.41-ethers-lookup.patch deleted file mode 100644 index 6cbc355e2854..000000000000 --- a/net-misc/wakeonlan/files/wakeonlan-0.41-ethers-lookup.patch +++ /dev/null @@ -1,90 +0,0 @@ ---- wakeonlan-0.41.orig/wakeonlan -+++ wakeonlan-0.41/wakeonlan -@@ -5,6 +5,7 @@ - ######################################################################### - - use strict; -+use Net::hostent; - use Socket; - use Getopt::Std; - use vars qw($VERSION $opt_v $opt_h $opt_i $opt_p $opt_f); -@@ -44,19 +45,64 @@ - - sub wake - { -- my $hwaddr = shift; -+ my $host = shift; - my $ipaddr = shift || $DEFAULT_IP; - my $port = shift || $DEFAULT_PORT; - - my ($raddr, $them, $proto); -- my ($hwaddr_re, $pkt); -+ my ($hwaddr, $hwaddr_re, $pkt); - -- # Validate hardware address (ethernet address) -+ # get the hardware address (ethernet address) - - $hwaddr_re = join(':', ('[0-9A-Fa-f]{1,2}') x 6); -- if ($hwaddr !~ m/^$hwaddr_re$/) { -- warn "Invalid hardware address: $hwaddr\n"; -- return undef; -+ if ($host =~ m/^$hwaddr_re$/) { -+ $hwaddr = $host; -+ } else { -+ # $host is not a hardware address, try to resolve it -+ my $ip_re = join('\.', ('([0-9]|[1-9][0-9]|1[0-9]{2}|2([0-4][0-9]|5[0-5]))') x 4); -+ my $ip_addr; -+ if ($host =~ m/^$ip_re$/) { -+ $ip_addr = $host; -+ } else { -+ my $h; -+ unless ($h = gethost($host)) { -+ warn "$host is not a hardware address and I could not resolve it as to an IP address.\n"; -+ return undef; -+ } -+ $ip_addr = inet_ntoa($h->addr); -+ } -+ # look up ip in /etc/ethers -+ unless (open (ETHERS, '<', '/etc/ethers')) { -+ warn "$host is not a hardware address and I could not open /etc/ethers.\n"; -+ return undef; -+ } -+ while (<ETHERS>) { -+ if (($_ !~ m/^$/) && ($_ !~ m/^#/)) { # ignore comments -+ my ($mac, $ip); -+ ($mac, $ip) = split(' ', $_, 3); -+ if ($ip =~ m/^$ip$/) { -+ if ($ip eq $ip_addr) { -+ $hwaddr = $mac; -+ last; -+ } -+ next; -+ } else { -+ my $h2; -+ unless ($h2 = gethost($ip)) { -+ next; -+ } -+ if (inet_ntoa($h2->addr) eq $ip_addr) { -+ $hwaddr = $mac; -+ last; -+ } -+ } -+ } -+ } -+ close (ETHERS); -+ unless (defined($hwaddr)) { -+ warn "Could not find $host in /etc/ethers\n"; -+ return undef; -+ } - } - - # Generate magic sequence -@@ -68,7 +114,7 @@ - - # Allocate socket and send packet - -- $raddr = gethostbyname($ipaddr); -+ $raddr = gethostbyname($ipaddr)->addr; - $them = pack_sockaddr_in($port, $raddr); - $proto = getprotobyname('udp'); - |