[Nagiosplug-devel] [ nagiosplug-Patches-1391483 ] utils.sh.in hardcodes path to sed
SourceForge.net
noreply at sourceforge.net
Wed Mar 22 05:00:09 CET 2006
Patches item #1391483, was opened at 2005-12-27 21:37
Message generated for change (Comment added) made by tonvoon
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: Pending
>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: Ton Voon (tonvoon)
Date: 2006-03-22 12: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