HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
Re: [hylafax-users] textfmt picky about filenames?
On 2003.06.17 09:19 Liem Bahneman wrote:
>
> When I send a _postscript_ file with carat's in the file name through
> sendfax, when it calls textfmt, it tries to break the filename apart
> on
> the carats (and according to truss, exec 'foo').
>
> sendfax -D -m -k "now +72 hours" -n -f 'user@host.com' -d '55512123'
> "foo^bar"
> sh: foo: not found
> sh: bar: cannot open
> Error converting data; command was "/opt/hylafax/sbin/textfmt -B -f
> Courier-Bold -p 11 -s default >/tmp//sndfaxQ_aaL5 < foo^bar"
>
> However, when I run the textfmt command as displayed, it works. So
> somewhere in the handoff between sendfax and textfmt, the carat is
> throwing a wrench in. Truss says its trying to exec 'bar' and open()
> 'foo':
>
> 29989: stat64("/usr/sbin/bar", 0xFFBFF880) Err#2 ENOENT
> 29991: creat64("/tmp//sndfaxsxaiK6", 0666) = 5
> 29989: stat64("/usr/bin/bar", 0xFFBFF880) Err#2 ENOENT
> 29991: fcntl(1, F_GETFD, 0x00000000) = 0
> 29989: stat64("/opt/hylafax/bin/bar", 0xFFBFF880) Err#2 ENOENT
> 29991: close(1) = 0
> 29991: fcntl(5, F_DUPFD, 0x00000001) = 1
> 29989: stat64("/opt/hylafax/sbin/bar", 0xFFBFF880) Err#2 ENOENT
> 29991: close(5) = 0
> 29989: stat64("/usr/local/bin/bar", 0xFFBFF880) Err#2 ENOENT
> 29991: open64("bar", O_RDONLY) Err#2 ENOENT
>
>
> This only occurs on postscript files, it happily processes the file if
> its
> a tiff!
>
> Can anyone explain this behavior? What executable/script is the "^"
> throwing off?
I cannot duplicate your problem here using RedHat Linux 7.1.
HOWEVER, I suspect that you can remedy your problem by editing the
relevant typerules entry to place quotes around the input file. Like
this:
diff -Nru hylafax.orig/util/typerules hylafax/util/typerules
--- hylafax.orig/util/typerules Mon Jun 16 16:26:00 2003
+++ hylafax/util/typerules Fri Jun 20 11:13:31 2003
@@ -132,7 +132,7 @@
0 string #Inventor V error IRIS Inventor
file >15 string binary error binary IRIS
Inventor file
>15 string ascii ps %F/textfmt -B -f
Courier-Bold\
- -Ml=0.4in -p 11 -s
%s >%o <%i
+ -Ml=0.4in -p 11 -s
%s >%o <"%i"
#
# Japanization (should help other iso-2022 variants too)
#
@@ -144,9 +144,9 @@
# This causes anything else with ascii-only data to be treated as
text.
#
0 ascii x ps %F/textfmt -B -f
Courier-Bold\
- -Ml=0.4in -p 11 -s
%s >%o <%i
+ -Ml=0.4in -p 11 -s
%s >%o <"%i"
# Support 7-bit text which would otherwise be seen as binary.
#
0 byte x ps %F/textfmt -B -f
Courier-Bold \
- -p 11 -s
%s >%o <%i
+ -p 11 -s
%s >%o <"%i"
You may need to escape those quotes (perhaps even escape the escape)
like this:
diff -Nru hylafax.orig/util/typerules hylafax/util/typerules
--- hylafax.orig/util/typerules Mon Jun 16 16:26:00 2003
+++ hylafax/util/typerules Fri Jun 20 11:13:31 2003
@@ -132,7 +132,7 @@
0 string #Inventor V error IRIS Inventor
file >15 string binary error binary IRIS
Inventor file
>15 string ascii ps %F/textfmt -B -f
Courier-Bold\
- -Ml=0.4in -p 11 -s
%s >%o <%i
+ -Ml=0.4in -p 11 -s
%s >%o <\"%i\"
#
# Japanization (should help other iso-2022 variants too)
#
@@ -144,9 +144,9 @@
# This causes anything else with ascii-only data to be treated as
text.
#
0 ascii x ps %F/textfmt -B -f
Courier-Bold\
- -Ml=0.4in -p 11 -s
%s >%o <%i
+ -Ml=0.4in -p 11 -s
%s >%o <\"%i\"
# Support 7-bit text which would otherwise be seen as binary.
#
0 byte x ps %F/textfmt -B -f
Courier-Bold \
- -p 11 -s
%s >%o <%i
+ -p 11 -s
%s >%o <\"%i\"
HOWEVER, textfmt shouldn't be called to process PostScript files in the
first place. So you may want to check on the validity of the
PostScript files you're using.
Lee.
____________________ HylaFAX(tm) Users Mailing List _______________________
To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null
*To learn about commercial HylaFAX(tm) support, mail sales@hylafax.org.*