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

SourceForge.net noreply at sourceforge.net
Tue Dec 27 13:38:08 CET 2005


Patches item #1391483, was opened at 2005-12-27 21:37
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: Open
Resolution: None
Priority: 5
Submitted By: abs (absd)
Assigned to: Nobody/Anonymous (nobody)
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'
 }


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

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