1825775 Members
2131 Online
109687 Solutions
New Discussion

again my script!

 
SOLVED
Go to solution
Steven E. Protter
Exalted Contributor

Re: again my script!

Add this line to the script:

env > /tmp/env.reg

run it from the command line

change it to:

/usr/binenv > /tmp/env.cron


Let it run out of cron

diff /tmp/env.reg /tmp/env.cron

You will see differences. Make them go away, especially PATH issues. Then the script will work.

This methodology works for me 99% of the time.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sridhar Bhaskarla
Honored Contributor

Re: again my script!

Hi,

Two more ideas if there were already not given.


1. Put set -x in the beginning of your script so that you will something in your error.log

#!/usr/bin/sh
set -x



2. Try sourcing in root's profile in your script.



. /.profile

RPCD=$(ps -ef|grep -v grep|grep -c rpcd)



-Sri
You may be disappointed if you fail, but you are doomed if you don't try