From owner-freebsd-questions Sat Feb 15 8:55:13 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 94C3437B401 for ; Sat, 15 Feb 2003 08:55:11 -0800 (PST) Received: from as9-2-1.bi.s.bonet.se (as9-2-1.bi.s.bonet.se [217.215.7.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F98343F93 for ; Sat, 15 Feb 2003 08:55:10 -0800 (PST) (envelope-from peo@intersonic.se) Received: by as9-2-1.bi.s.bonet.se (Postfix, from userid 1003) id 0254649697A; Sat, 15 Feb 2003 17:55:09 +0100 (CET) Message-ID: <3E4E70E6.7080700@intersonic.se> Date: Sat, 15 Feb 2003 17:55:02 +0100 From: Per olof Ljungmark Organization: Intersonic AB User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.2.1) Gecko/20030126 X-Accept-Language: en-us, en, sv MIME-Version: 1.0 To: Heinrich Rebehn Cc: freebsd-questions@freebsd.org Subject: Re: gs not found, scripts failing References: <3E4E141D.9000302@intersonic.se> <3E4E65CB.9080908@ant.uni-bremen.de> In-Reply-To: <3E4E65CB.9080908@ant.uni-bremen.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-102.8 required=5.7 tests=IN_REP_TO,NOSPAM_INC,QUOTED_EMAIL_TEXT,REFERENCES, SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_MOZILLA_UA, USER_IN_WHITELIST,X_ACCEPT_LANG version=2.44 X-Spam-Level: X-Sanitizer: Advosys mail filter Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Heinrich Rebehn wrote: > Per olof Ljungmark wrote: > >> I'm having problems with scripts involvivng Ghostscript on FreeBSD >> (4.6-4.7). >> Specifically, I am implementing a Hylafax solution and most of it >> works but there a two areas that fail: >> 1. Running the SambaFax (http://www.purpel3.com/sambafax/) utility >> that extracts a fax number from a postscript file >> >> 2. Using the "faxrcvd" script that comes with Hylafax converting >> incoming faxes to pdf's. >> >> In both cases the scripts seems to fail when tiff2ps, ps2pdf etc. are >> being executed. >> >> Running the scripts manually from the shell works. > > > seems like /usr/local/bin (this is where gs lives) is not in the PATH > when your scripts are executed. Try to set the PATH env variable in the > script, i.e. > > PATH=/usr/bin:/usr/local/bin > export PATH > > (Syntax is for Bourne shell) Thanks for the advice. Since my original post I have concluded that the two problems are similar but not identical and concentrated on (2.). From what I can see all seach paths are added in the script. Also I should have added earlier that a pdf file IS produced but with zero byte lenght. This is when the script is called from Hylafax server. Again, when run from the command line, faxrcvd works and the pdf is ok. This has led me to believe that the problem is the location of the temporary files used to produce the pdf. I have tried adding "#!/bin/sh -xv" but this only works from the command line. How can I pipe the debugging output from a scrpt to a file? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message