From: Harm Ensing (ensin001@hdxh0e.unix.telecom.ptt.nl)
Date: Thu Apr 07 2005 - 07:20:28 EDT
Hello,
I did a quick scan on the HP-UX admin website but could not find anything usefull.
The problem we are experiencing is that when executing a remote command
through ssh does not import /etc/profile so evironment variables like TZ
are not set.
When I run the following command on two different systems I get :
# ssh system1 "echo \"TZ=$TZ\"; /usr/sbin/kmtune|grep timezone; date"
TZ=
timezone -60 - (-60)
Thu Apr 7 06:54:31 EDT 2005
# ssh system2 "echo \"TZ=$TZ\"; /usr/sbin/kmtune|grep timezone; date"
TZ=
timezone 420 - 420
Thu Apr 7 12:54:27 METDST 2005
So, it appears that the default timezone is different.
Question: could this have to do the timezone kernel-setting which is obviously different on both systems?
Note:
any documentation about the link between this kernel setting (other than the man page) is welcome!
For instance, I cannot figure out what the link could be between -60 and EDT on the one hand and 420 and
METDST on the other.
I am aware of the fact that we could force importing /etc/profile in the script:
# ssh system2 ". /etc/profile; echo \"TZ=$TZ\"; /usr/sbin/kmtune|grep timezone; date"
What I would like to know is: is there a way to force ssh to import /etc/profile when executing a command
other than the way I mentioned above.
Any help/info is welcome.
-Harm-
-- ---> Please post QUESTIONS and SUMMARIES only!! <--- To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl Name: hpux-admin@dutchworks.nl Owner: owner-hpux-admin@dutchworks.nl Archives: ftp.dutchworks.nl:/pub/digests/hpux-admin (FTP, browse only) http://www.dutchworks.nl/htbin/hpsysadmin (Web, browse & search)
This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:46 EDT