Data Protector Support and News Forum
Showing results for 
Search instead for 
Do you mean 

$PATH is null on client pre and post-exec script

Regular Advisor

$PATH is null on client pre and post-exec script

Good afternoon,

Basic info:
Manager:
DP v6.11
HP-UX nodeA B.11.31

Client:
HP-UX nodeB B.11.31 U ia64
HP Data Protector A.06.11
No patches loaded

Cell mgr nodeA starts backup to nodeB and executes option on nodeB /opt/omni/lbin/begin script that shuts down apps.

When DP calls either a similar option file on the local cell mgr, or when I execute an interactive app shutdown on the remote node there are no errors as both have $PATH defined from /etc/PATH.

However, when DP calls the remote node's /opt/omni/lbin/app-shutdown, it fails to find scripts, commands; even "standard" commands such as grep fail.

I've determined that via "echo $PATH" that $PATH is null in the latter case.

Are there any suggestions to source in DP option pre-exec the remote system's /etc/PATH, or to provide the usual $PATH available via interactive login?

Thanks for your help. ,,, Joe S.
4 REPLIES
Frequent Advisor

Re: $PATH is null on client pre and post-exec script

I think there is some mistake in your script please run manually this script to check proper shutdown of application then proper appication UP as well as permission of the user (DP) has the full right as a admin for client .
Regular Advisor

Re: $PATH is null on client pre and post-exec script

Good Morning,

Thanks for your attention & question.

Perms are O.K. and script executes successfully from terminal interactive session when $PATH is "normal". Also, this only occurs when executed on the remote "client" system, not the cell manager.

Here's "proof" that $PATH is undefined when called from DP on the client(remote) system.

#! /usr/bin/ksh -xv
echo $PATH
+ echo
[NO $PATH VARIABLE DEFINED IN DP]

Thanks.
Joe S.
Regular Advisor

Re: $PATH is null on client pre and post-exec script

In case anyone else looks around for an answer, here's one provided by an HP consultant we had on hand. I was only smart enough to do what he said!

Source both the system default and root's .profile in the application's shutdown & startup script to establish the normal PATH so that application shutdown finds its commands, scripts, etc.

. /etc/profile 1>&- 2>&-
. ~/.profile 1>&- 2>&-
export PATH

/etc/profile establishes system PATH, and .profile any local modifications.
Regular Advisor

Re: $PATH is null on client pre and post-exec script

See above