debian/0000755000000000000000000000000011726734063007177 5ustar debian/changelog0000644000000000000000000000570711726734063011062 0ustar wakeonlan (0.41-11) unstable; urgency=low * Switch to dpkg-source 3.0 (quilt) format. * Update for policy 3.9.3; various other packaging cleanups. -- Thijs Kinkhorst Sat, 10 Mar 2012 21:23:10 +0100 wakeonlan (0.41-10) unstable; urgency=low * Various packaging cleanups: add watch file, check for newer standards version, add Homepage field etc. -- Thijs Kinkhorst Wed, 05 Mar 2008 16:35:52 +0100 wakeonlan (0.41-9) unstable; urgency=low * Adopt package (Closes: 408223). * Tweak description and debian/rules a bit. -- Thijs Kinkhorst Wed, 24 Jan 2007 17:03:49 +0100 wakeonlan (0.41-8) unstable; urgency=low * Orphaning package. -- Daniel Baumann Thu, 18 Jan 2007 11:22:00 +0100 wakeonlan (0.41-7) unstable; urgency=low * Applied patch from Vincent Danjean to support symbolic names in /etc/ethers (Closes: #296825). -- Daniel Baumann Thu, 18 Jan 2007 11:22:00 +0100 wakeonlan (0.41-6) unstable; urgency=low * Forgot to change to arch all. -- Daniel Baumann Sat, 30 Sep 2006 13:50:00 +0200 wakeonlan (0.41-5) unstable; urgency=low * New maintainer (Closes: #390293). * Simplified debian directory. * Using dpatch now for upstream modifications. -- Daniel Baumann Sat, 30 Sep 2006 13:06:00 +0200 wakeonlan (0.41-4) unstable; urgency=low * Updated to Debian Standards version 3.7.2 - Changed Build-Deps-Indep: into Build-Deps: - Changed several accented characters into their "normal" versions. (Must find a real solution, since this is nasty.) -- Steve Kemp Tue, 30 May 2006 23:07:44 +0000 wakeonlan (0.41-3) unstable; urgency=low * Updated to Debian Standards version 3.6.2 * Added patch from Timo Weingartner to support the use of /etc/ethers (Closes: #296825) -- Steve Kemp Sat, 13 Aug 2005 00:06:55 +0000 wakeonlan (0.41-2) unstable; urgency=low * Changed 'Build-Depends' to 'Build-Depends-Indep' this fixes the only outstanding Lintian warning. -- Steve Kemp Mon, 18 Apr 2005 17:19:45 +0000 wakeonlan (0.41-1) unstable; urgency=low * New upstream release. * Correct manpage is referenced when invoked with no args. Fixed upstream. (Closes: #291117) -- Steve Kemp Tue, 1 Feb 2005 14:16:03 +0000 wakeonlan (0.40-2) unstable; urgency=low * Release to fix up bogus packaging errors spotted and reported by Michal Politowski. * Install manpage in correct directory, not / (Closes: #290150) * Include examples directory in /usr/share/doc/wakeonlan (Closes: #290151) * Move manpage into section 1, not 1p. -- Steve Kemp Thur, 13 Jan 2005 12:59:20 +0000 wakeonlan (0.40-1) unstable; urgency=low * Initial Debian package. (Closes: #286838) -- Steve Kemp Wed, 22 Dec 2004 22:25:18 +0000 debian/install0000644000000000000000000000002311726733701010561 0ustar wakeonlan /usr/bin debian/control0000644000000000000000000000162511726733701010604 0ustar Source: wakeonlan Section: net Priority: optional Maintainer: Thijs Kinkhorst Build-Depends: debhelper (>= 9), perl Standards-Version: 3.9.3 Homepage: http://gsd.di.uminho.pt/jpo/software/wakeonlan/ Vcs-Svn: https://svn.kinkhorst.nl/svn/debian/wakeonlan/trunk Vcs-Browser: https://aphrodite.kinkhorst.nl/wsvn/debian/wakeonlan/ Package: wakeonlan Architecture: all Depends: perl, perl-modules, ${misc:Depends} Description: Sends 'magic packets' to wake-on-LAN enabled ethernet adapters With this package you can remotely wake up and power on machines which have motherboards or network cards that support 'Wake-on-Lan' packets. . The tool allows you to wake up a single machine, or a group of machines. . You need the MAC addresses of machines to construct the WOL packets, but, in contrast to 'etherwake', you do not need root privileges to use the program itself as UDP packets are used. debian/watch0000644000000000000000000000013211726733701010222 0ustar version=3 http://gsd.di.uminho.pt/jpo/software/wakeonlan/ downloads/wakeonlan-(.+).tar.gz debian/docs0000644000000000000000000000000711726733701010045 0ustar README debian/rules0000755000000000000000000000154211726733701010257 0ustar #!/usr/bin/make -f build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: dh_testdir # Building package perl Makefile.PL $(MAKE) touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp [ ! -f Makefile ] || $(MAKE) distclean dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs install -D -m 0644 blib/man1/wakeonlan.1p debian/wakeonlan/usr/share/man/man1/wakeonlan.1 sed -i -e 's/1p/1/g' debian/wakeonlan/usr/share/man/man1/wakeonlan.1 binary-arch: build install binary-indep: build install dh_testdir dh_testroot dh_installchangelogs Changes dh_installdocs dh_installexamples dh_install dh_link dh_compress dh_fixperms dh_installdeb dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install debian/examples0000644000000000000000000000002411726733701010732 0ustar examples/lab001.wol debian/source/0000755000000000000000000000000011726734055010500 5ustar debian/source/format0000644000000000000000000000001411726734055011706 0ustar 3.0 (quilt) debian/copyright0000644000000000000000000000144211726733701011131 0ustar This is the Debian package for wakeonlan. It was downloaded from http://gsd.di.uminho.pt/jpo/software/wakeonlan/. Upstream Author: Jose Pedro Oliveira Copyright (C) 2000-2005 Jose Pedro Oliveira Copyright (C) Ico Doornekamp License: This software is licensed under the terms of the Perl Artistic License. On Debian systems, the complete text of the Perl Artistic License can be found in /usr/share/common-licenses/Artistic file. The package was originally made for Debian by Steve Kemp, who passed it on to Daniel Baumann. The current maintainer is Thijs Kinkhorst. The Debian packaging is (C) 2006-2007, Daniel Baumann and (c) 2007 Thijs Kinkhorst. It is licensed under the GPL, see `/usr/share/common-licenses/GPL'. debian/compat0000644000000000000000000000000211726733701010373 0ustar 9 debian/patches/0000755000000000000000000000000011726734644010633 5ustar debian/patches/series0000644000000000000000000000001511726734644012044 0ustar 01-etcethers debian/patches/01-etcethers0000644000000000000000000000467711726733701012771 0ustar Description: add support for /etc/ethers Origin: vendor diff -Naur wakeonlan-0.41.orig/wakeonlan wakeonlan-0.41/wakeonlan --- wakeonlan-0.41.orig/wakeonlan 2005-01-27 16:03:54.000000000 +0000 +++ wakeonlan-0.41/wakeonlan 2007-01-18 10:20:55.000000000 +0000 @@ -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 () { + if (($_ !~ m/^$/) && ($_ !~ m/^#/)) { # ignore comments + my ($mac, $ip); + ($mac, $ip) = split(' ', $_, 3); + if ($ip =~ m/^$ip$/) { + if ($ip eq $ip_addr or $ip eq $host) { + $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'); debian/dirs0000644000000000000000000000001011726733701010050 0ustar usr/bin