PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: crontab env question
Date: Mar 28 2001 2:43PM

jmcallister@dtint.com writes:
 > 
 > I always include this code in a BEGIN block.
 > 
 > 
 > 
 > BEGIN {
 >      # If it's not defined, set the SYBASE environment variable to the
 >      # sybase user's home or /usr/local/sybase (in that order).
 >      #
 >      my($home) = (getpwnam('sybase'))[7];
 >      $ENV{SYBASE} = $home ? $home : '/usr/local/sybase' unless
 > $ENV{SYBASE};
 > }
 > use Sybase::CTlib;
 > 
 > 
 > 
 > There's also a way to compile the CTlib module with a backup value of
 > SYBASE hard coded. In other words, the default value if not already defined
 > in the environment.

Indeed.

However, IIRC the original poster had a problem with LD_LIBRARY_PATH
(can't load libct.so).

To fix that you have to set LD_LIBRARY_PATH, and that must be done
before the process that needs the LD_LIBRARY_PATH's value is started
(hence in the cron entry itself).

Michael
-- 
Michael Peppler - Data Migrations Inc. - mpeppler@peppler.org
http://www.mbay.net/~mpeppler - mpeppler@mbay.net
International Sybase User Group - http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com