[Nagiosplug-devel] [ nagiosplug-Patches-1391483 ] utils.sh.in hardcodes path to sed

SourceForge.net noreply at sourceforge.net
Wed Apr 5 19:21:02 CEST 2006


Patches item #1391483, was opened at 12/27/05 13:37
Message generated for change (Comment added) made by sf-robot
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1391483&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Bugfix
Group: None
>Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: abs (absd)
Assigned to: Ton Voon (tonvoon)
Summary: utils.sh.in hardcodes path to sed

Initial Comment:
plugins-scripts/utils.sh.in hardcodes the path to sed
as /bin/sed, which is fine for Linux systems but not
for others such as Solaris and BSD:

The following patch was cut & pasted, so may need
'patch -l' to apply.

--- plugins-scripts/utils.sh.in.orig    2002-06-06
05:16:56.000000000 +0100
+++ plugins-scripts/utils.sh.in
@@ -12,12 +12,18 @@ else
        ECHO=echo
 fi

+if test -x /bin/sed; then
+       SED=/bin/sed
+else
+       SED=/usr/bin/sed
+fi
+
 print_revision() {
        echo "$1 (@PACKAGE@ @VERSION@) $2"
-       $ECHO "@WARRANTY@" | /bin/sed -e 's/\n/ /g'
+       $ECHO "@WARRANTY@" | $SED -e 's/\n/ /g'
 }

 support() {
-       $ECHO "@SUPPORT@" | /bin/sed -e 's/\n/ /g'
+       $ECHO "@SUPPORT@" | $SED -e 's/\n/ /g'
 }


----------------------------------------------------------------------

>Comment By: SourceForge Robot (sf-robot)
Date: 04/05/06 19:20

Message:
Logged In: YES 
user_id=1312539

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

----------------------------------------------------------------------

Comment By: Ton Voon (tonvoon)
Date: 03/22/06 04:59

Message:
Logged In: YES 
user_id=664364

Abs,

Thanks for the patch. Have changed it to just run sed, so it should be discovered 
at run time.

Ton

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1391483&group_id=29880




More information about the Devel mailing list