Operating System - HP-UX
1833777 Members
1994 Online
110063 Solutions
New Discussion

Re: Omnibacks's uma utility

 
SOLVED
Go to solution

Omnibacks's uma utility

I can't use Omnibacks's uma utility from cron
Someone know why ?
I'm trying to invoce uma from cron to move a tape from a slot to a drive in a DLT.
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor

Re: Omnibacks's uma utility

Sure, because /opt/omni/lbin is not in the PATH when cron runs. Cron's PATH is intentionally sparse. You will need to set and export PATH within your script before your call to uma.
If it ain't broke, I can fix that.

Re: Omnibacks's uma utility

Thanks, but I'm invoking de uma with the absolute path: /opt/omni/lbin/uma
Deshpande Prashant
Honored Contributor

Re: Omnibacks's uma utility

What errors do you get with uma from cron?

Thanks.
Prashant.
Take it as it comes.
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Omnibacks's uma utility

You also need to specify the undocumented option -tty to tell uma that this is a non-tty based session. You didn't indicate what OS and OB2 version you are running but there is a patch for this bug.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Omnibacks's uma utility

Hi Marco:

Just I as test I ran the following script to do a "stat" and send the result to a temp file under cron; it worked like a champ.

#!/usr/bin/sh

TDIR=${TMPDIR:-/var/tmp}
PID=$$
C1=${TDIR}/C${PID}_1.cmd
T1=${TDIR}/C${PID}_1.txt

ROBOT=/dev/robot/c2t3d0
D1=/dev/rmt/1mnb
D2=/dev/rmt/3mnb



echo "stat" > ${C1}
/opt/omni/lbin/uma -ioctl ${ROBOT} -tty -barcode -device ${D1} ${D2} < ${C1} > ${T1} 2>&1
STAT=$?
rm -f ${C1}
exit ${STAT}


If it ain't broke, I can fix that.

Re: Omnibacks's uma utility

Hi Clay:
You right, a fix my problem adding the -tty option.
Thank you very much.