]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Neither the eval string or the sed script were working properly on different
authorAidan Van Dyk <aidan@ifax.com>
Mon, 9 Jan 2006 19:26:31 +0000 (19:26 +0000)
committerAidan Van Dyk <aidan@ifax.com>
Mon, 9 Jan 2006 19:26:31 +0000 (19:26 +0000)
sh/sed combinations.  This aims to be more portable.

CHANGES
util/faxrcvd.sh.in

diff --git a/CHANGES b/CHANGES
index 919a9b2285666472f901730a72ec937ebb8d53e4..e28c4644cdf5e9271c1e44791d708369be9f2bd0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,7 @@
 Changelog since HylaFAX 4.2.4
 
 * Include crypt.h where necessary (BUG 722) (9 Jan 2005)
+* Fix eval sed in faxrcvd script (BUG 719) (9 Jan 2006)
 * Fix shell comments in nofity AWK script (BUG 719) (9 Jan 2006)
 
 Changelog for HylaFAX 4.2.4
index ead6c2a97ec715710f744ebb46ea4472ca1f10f2..5944bd0ba83e5673c6eaeb82925fdba69fbdfbc4 100644 (file)
@@ -103,12 +103,9 @@ COMMID="$1"; shift;
 MSG="$1"; shift;
 COUNT=1
 while [ $# -ge 1 ]; do
-    # In shell scripts, there are no special characters in hard-quoted
-    # strings (quoted with (')). Single-quotes can't even be escaped
-    # inside such strings and must be put outside of them. We thus replace
-    # (') with ('\'') which terminates the current string, adds a single
-    # quote and starts a new string.
-    eval "CALLID$COUNT='`echo $1 | $SED -e "s/'/'\\\\\''/g"`'"
+    # The eval has $1 set yet, and this forces a variable-to-variable
+    # assignment, allowing us to not need to do escaping
+    eval CALLID$COUNT='$1'
     shift
     COUNT=`expr $COUNT + 1`
 done