From db4b05f16e4f86b26e9b2b4fb6646b3608ba5b3f Mon Sep 17 00:00:00 2001 From: hubertf Date: Thu, 18 Nov 1999 22:28:15 +0000 Subject: Send a broadcast message to all clients of a subnet containing a magic packet to boot the machine up. Usage: wakeup xx:xx:xx:xx:xx:xx xx:xx:xx:xx:xx:xx is the MAC address of the machine you want to wake up. Can be obtained via "arp -a" (remote) or "ifconfig -a" (local), --- net/wakeup/Makefile | 26 ++++++++++++++++++++++++++ net/wakeup/files/md5 | 3 +++ net/wakeup/files/patch-sum | 3 +++ net/wakeup/patches/patch-aa | 43 +++++++++++++++++++++++++++++++++++++++++++ net/wakeup/pkg/COMMENT | 1 + net/wakeup/pkg/DESCR | 8 ++++++++ net/wakeup/pkg/PLIST | 2 ++ 7 files changed, 86 insertions(+) create mode 100644 net/wakeup/Makefile create mode 100644 net/wakeup/files/md5 create mode 100644 net/wakeup/files/patch-sum create mode 100644 net/wakeup/patches/patch-aa create mode 100644 net/wakeup/pkg/COMMENT create mode 100644 net/wakeup/pkg/DESCR create mode 100644 net/wakeup/pkg/PLIST (limited to 'net/wakeup') diff --git a/net/wakeup/Makefile b/net/wakeup/Makefile new file mode 100644 index 00000000000..3c5f1c39342 --- /dev/null +++ b/net/wakeup/Makefile @@ -0,0 +1,26 @@ +# $NetBSD: Makefile,v 1.1.1.1 1999/11/18 22:28:15 hubertf Exp $ +# + +DISTNAME= hpwake.c.gz +PKGNAME= wakeup-1.0 +CATEGORIES= sysutils net +MASTER_SITES= http://141.99.132.33/wol/ +EXTRACT_SUFX= # empty + +MAINTAINER= hubertf@netbsd.org +HOMEPAGE= http://www.berens-partner.de/wann/computer/wol.html + +NO_WRKSUBDIR= yes + +do-extract: + ${MKDIR} ${WRKSRC} + ${CP} ${DISTDIR}/${DISTNAME} ${WRKSRC}/${DISTNAME} + ${GUNZIP_CMD} ${WRKSRC}/${DISTNAME} + +do-build: + (cd ${WRKSRC} ; ${CC} ${CFLAGS} -O2 -o ${DISTNAME:C/.c.gz//} ${DISTNAME:C/.gz//} ) + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/${DISTNAME:C/.c.gz//} ${PREFIX}/bin/${PKGNAME:C/-.*$//} + +.include "../../mk/bsd.pkg.mk" diff --git a/net/wakeup/files/md5 b/net/wakeup/files/md5 new file mode 100644 index 00000000000..3577943fd0a --- /dev/null +++ b/net/wakeup/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1.1.1 1999/11/18 22:28:15 hubertf Exp $ + +MD5 (hpwake.c.gz) = 11bc973465792f1a9cc12d078a89eeb9 diff --git a/net/wakeup/files/patch-sum b/net/wakeup/files/patch-sum new file mode 100644 index 00000000000..78dd9109686 --- /dev/null +++ b/net/wakeup/files/patch-sum @@ -0,0 +1,3 @@ +$NetBSD: patch-sum,v 1.1.1.1 1999/11/18 22:28:16 hubertf Exp $ + +MD5 (patch-aa) = 71c42bd6d5efd8006ccc193e5d435026 diff --git a/net/wakeup/patches/patch-aa b/net/wakeup/patches/patch-aa new file mode 100644 index 00000000000..165bb807d82 --- /dev/null +++ b/net/wakeup/patches/patch-aa @@ -0,0 +1,43 @@ +$NetBSD: patch-aa,v 1.1.1.1 1999/11/18 22:28:16 hubertf Exp $ + +--- hpwake.c.orig Thu Nov 18 23:18:47 1999 ++++ hpwake.c Thu Nov 18 23:21:54 1999 +@@ -42,7 +42,7 @@ + + for (a = arg; *a; a++) + if (*a != ':' && !isxdigit(*a)) { +- fprintf(stderr, "MAC Adresse muss hexadezimal angegeben werden! [00:11:22:33:44:55]\n"); ++ fprintf(stderr, "MAC address must be given in hex! [00:11:22:33:44:55]\n"); + exit(2); + } + +@@ -50,7 +50,7 @@ + &dstaddr[0], &dstaddr[1], &dstaddr[2], &dstaddr[3], &dstaddr[4], &dstaddr[5]); + + if (k != 6) { +- fprintf(stderr, "Ungueltige MAC Adresse! [00:11:22:33:44:55]\n"); ++ fprintf(stderr, "Invalid MAC address! [00:11:22:33:44:55]\n"); + exit(2); + } + +@@ -98,6 +98,11 @@ + int s; + int i; + ++ if (argc < 2) { ++ fprintf(stderr, "Usage: %s xx:xx:xx:xx:xx:xx\n", argv[0]); ++ exit(1); ++ } ++ + packetsize = get_magicpacket(magicpacket, argv[1]); + + if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) +@@ -111,7 +116,7 @@ + server.sin_addr.s_addr = INADDR_ANY; + + client.sin_family = AF_INET; +- client.sin_port = 7777; ++ client.sin_port = 32768+666; /* invalid port */ + client.sin_addr.s_addr = INADDR_BROADCAST; + + if (bind(s, (struct sockaddr *)&server, sizeof(server)) < 0) diff --git a/net/wakeup/pkg/COMMENT b/net/wakeup/pkg/COMMENT new file mode 100644 index 00000000000..6d384cc63a0 --- /dev/null +++ b/net/wakeup/pkg/COMMENT @@ -0,0 +1 @@ +Wakeup On LAN client for remote power-up of machines diff --git a/net/wakeup/pkg/DESCR b/net/wakeup/pkg/DESCR new file mode 100644 index 00000000000..136604b46a0 --- /dev/null +++ b/net/wakeup/pkg/DESCR @@ -0,0 +1,8 @@ +Send a broadcast message to all clients of a subnet containing +a magic packet to boot the machine up. + +Usage: wakeup xx:xx:xx:xx:xx:xx + +xx:xx:xx:xx:xx:xx is the MAC address of the machine you want to +wake up. Can be obtained via "arp -a" (remote) or "ifconfig -a" +(local), diff --git a/net/wakeup/pkg/PLIST b/net/wakeup/pkg/PLIST new file mode 100644 index 00000000000..5530fabbe06 --- /dev/null +++ b/net/wakeup/pkg/PLIST @@ -0,0 +1,2 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 1999/11/18 22:28:15 hubertf Exp $ +bin/wakeup -- cgit v1.2.3