lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

100-no_ether_hostton.patch (1228B)


      1 --- etherwake-1.09.orig/ether-wake.c	2005-07-10 20:44:25.000000000 +0200
      2 +++ etherwake-1.09.orig.no_ether_hostton/ether-wake.c	2007-04-29 19:03:41.000000000 +0200
      3 @@ -15,7 +15,11 @@
      4  "	an optional password appended.\n"
      5  "\n"
      6  "	The single required parameter is the Ethernet MAC (station) address\n"
      7 +#if !defined(__UCLIBC__)
      8  "	of the machine to wake or a host ID with known NSS 'ethers' entry.\n"
      9 +#else
     10 +"	of the machine to wake.\n"
     11 +#endif
     12  "	The MAC address may be found with the 'arp' program while the target\n"
     13  "	machine is awake.\n"
     14  "\n"
     15 @@ -289,16 +293,22 @@
     16  		if (debug)
     17  			fprintf(stderr, "The target station address is %s.\n",
     18  					ether_ntoa(eaddr));
     19 +#if !defined(__UCLIBC__)
     20  	} else if (ether_hostton(hostid, eaddr) == 0) {
     21  		if (debug)
     22  			fprintf(stderr, "Station address for hostname %s is %s.\n",
     23  					hostid, ether_ntoa(eaddr));
     24 +#endif
     25  	} else {
     26  		(void)fprintf(stderr,
     27  					  "ether-wake: The Magic Packet host address must be "
     28  					  "specified as\n"
     29 +#if !defined(__UCLIBC__)
     30  					  "  - a station address, 00:11:22:33:44:55, or\n"
     31  					  "  - a hostname with a known 'ethers' entry.\n");
     32 +#else
     33 +					  "  - a station address, 00:11:22:33:44:55\n");
     34 +#endif
     35  		return -1;
     36  	}
     37  	return 0;