From 2e6646e59190a536a4eb61fd05cfbf71f549fd95 Mon Sep 17 00:00:00 2001 From: miwi Date: Sat, 13 Feb 2010 19:14:33 +0000 Subject: - Use $SUB_FILES to dynamically update findmtu script PR: 143105 Submitted by: Sevan Janiyan Approved by: maintainer --- net/findmtu/Makefile | 5 ++--- net/findmtu/files/findmtu.in | 8 ++++++++ net/findmtu/files/findmtu.sh | 8 -------- 3 files changed, 10 insertions(+), 11 deletions(-) create mode 100644 net/findmtu/files/findmtu.in delete mode 100644 net/findmtu/files/findmtu.sh (limited to 'net') diff --git a/net/findmtu/Makefile b/net/findmtu/Makefile index a2a6740ecd90..4bc910f8e1b8 100644 --- a/net/findmtu/Makefile +++ b/net/findmtu/Makefile @@ -13,12 +13,11 @@ MASTER_SITES= http://www.dia.uniroma3.it/~compunet/tunneldiscovery/findmtu/ MAINTAINER= janos.mohacsi@bsd.hu COMMENT= A tool for performing IPv6 path MTU discovery on *NIX +SUB_FILES= findmtu + do-configure: ${LN} -s ${WRKSRC}/Makefile.rawsocket ${WRKSRC}/Makefile -post-build: - ${SED} -e "s:%%PREFIX%%:${PREFIX}:g" ${FILESDIR}/findmtu.sh > ${WRKDIR}/findmtu - do-install: ${INSTALL_SCRIPT} ${WRKDIR}/findmtu ${PREFIX}/bin/findmtu ${INSTALL_PROGRAM} ${WRKSRC}/findmtu ${PREFIX}/bin/findmtu.real diff --git a/net/findmtu/files/findmtu.in b/net/findmtu/files/findmtu.in new file mode 100644 index 000000000000..a404f4f96eab --- /dev/null +++ b/net/findmtu/files/findmtu.in @@ -0,0 +1,8 @@ +#!/bin/sh +if netstat -rn -f inet6 | grep -qv $1; then + # Delete host route. As it is not in the routing table, + # we are sure that it is a cloned route and can be deleted + # safely + route delete -inet6 $i > /dev/null 2> /dev/null +fi +%%PREFIX%%/bin/findmtu.real $1 diff --git a/net/findmtu/files/findmtu.sh b/net/findmtu/files/findmtu.sh deleted file mode 100644 index a404f4f96eab..000000000000 --- a/net/findmtu/files/findmtu.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -if netstat -rn -f inet6 | grep -qv $1; then - # Delete host route. As it is not in the routing table, - # we are sure that it is a cloned route and can be deleted - # safely - route delete -inet6 $i > /dev/null 2> /dev/null -fi -%%PREFIX%%/bin/findmtu.real $1 -- cgit