$NetBSD: patch-ad,v 1.1 2005/06/20 02:59:36 jlam Exp $

--- plugins-scripts/subst.in.orig	2000-08-31 23:47:35.000000000 -0400
+++ plugins-scripts/subst.in
@@ -21,6 +21,11 @@ function which(c,path) {
 
 BEGIN {
 	split(ENVIRON["PATH"] ":/sbin:/usr/sbin",path,/:/);
+	for (dir in path) {
+		if (path[dir] ~ "@WRKDIR@") {
+			delete path[dir];
+		}
+	}
 }
 
 # scripting language (first line)
