Bug 57476 - correcting paths in net/netsaint plugins
Summary: correcting paths in net/netsaint plugins
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pete Fritchman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-01 21:30 UTC by Krzysztof Stryjek
Modified: 2003-12-21 05:06 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Stryjek 2003-10-01 21:30:19 UTC
	Netsaint plugins are programs, scripts needed to check various
services on monitored hosts. But this software was written to use on Linux,
so there are incorrect path to tools like sed, diff, tail or grep in plugins
scripts.

Fix: Here it is a patch for port Makefile to correct these paths:

----------------- cut here --------------------------------------------


Greetings
--
/~\ The ASCII                  Krzysztof Stryjek
\ / Ribbon Campaign            wtp@NOSPAM.mud.pl
 X  Against HTML              http://mud.pl/~wtp/
/ \ Email!               GG: 3608113   ICQ: 124986907--drTfIavhWuqqz02TezajFA7S32CNNRXARzKwGNgowkgIffO8
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- Makefile	Thu Feb 20 19:51:00 2003
+++ Makefile.new	Wed Oct  1 12:05:28 2003
@@ -18,6 +18,7 @@
 
 USE_SUBMAKE=	yes
 GNU_CONFIGURE=	yes
+USE_REINPLACE=	yes
 CONFIGURE_ARGS=	--sbindir=${PREFIX}/share/netsaint/sbin \
 		--libexecdir=${PREFIX}/libexec/netsaint \
 		--datadir=${PREFIX}/share/netsaint \
@@ -35,6 +36,10 @@
 .if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
 .include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
 .endif
+
+post-patch:
+	@${FIND} ${WRKSRC}/plugins-scripts/ -type f -perm -+x | ${XARGS} -n1 \
+	${REINPLACE_CMD} -E "s,/bin/(diff|sed|tail|grep),/usr/bin/\1,g"
 
 post-clean:
 	@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
----------------- cut here --------------------------------------------
How-To-Repeat: 	Just install netsaint plugins and try run
/usr/local/libexec/netsaint/log_check for example. There will be error
message: /bin/sed: No such file or directory.
Comment 1 Mark Linimon 2003-12-21 04:37:55 UTC
Although the patch applies correctly, I still get
the 'can't find /bin/sed' error when using check_log.
Can the submitter confirm this?

Also, I have patches for pkg-plist that removes the
files in libexec/.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2003-12-21 04:45:44 UTC
Responsible Changed
From-To: freebsd-ports-bugs->linimon

I'll take a look.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2003-12-21 04:46:06 UTC
State Changed
From-To: open->feedback

Note that I've asked the submitter for feedback.
Comment 4 Pete Fritchman freebsd_committer freebsd_triage 2003-12-21 05:05:38 UTC
State Changed
From-To: feedback->closed

I made the regex a bit lamer (because REINPLACE_CMD could still be perl 
on older systems), and this seems to work for me.  Committed, thanks! 


Comment 5 Pete Fritchman freebsd_committer freebsd_triage 2003-12-21 05:05:38 UTC
Responsible Changed
From-To: linimon->petef

Race condition, steal this from linimon with his blessing.