On Thu, Apr 17, 2003 at 02:11:26PM +0200, I wrote: >Greetings, > >I have a strange problem with environment variables. On a Sun E450 running >Solaris 7 Generic_106541-16 certain variables seem to exist but I cannot >find out where it is loaded from. Since the system has been up for over 230 >days software may have been removed or added that initially set these >variables. > >The variables in question are: > >CAIHPAD10=/CA/agents/data/hpa >AGENTWORKS_DIR=/CA > >I've checked /etc/profile ~/.profile but this is the only useful portion: > ># *---------------------------------------------- * ># Modifications made by setupNSM for ># Unicenter NSM Agent Technology ># *---------------------------------------------- * >if [ "$AGENTWORKS_DIR" = '' ] >then > AGENTWORKS_DIR="/ca" > export AGENTWORKS_DIR >fi > >if [ -f "$AGENTWORKS_DIR"/scripts/envset ] >then > . "$AGENTWORKS_DIR/scripts/envset" >fi > ># *---------------------------------------------- * ># End of Modifications made by setupNSM for ># Unicenter NSM Agent Technology ># *---------------------------------------------- * > >Somehow AGENTWORKS_DIR is being set somewhere but none of the usual places >contain this string. /bin/login, telnetd nor /bin/sh don't load these >variables. Creating a new user on the system and typing /usr/bin/env after >login shows these variables again. > >Any ideas on how to find where these variables are set? For the time being >forcing the setting in /etc/profile is the current solution but there must >be another explanation. > >thanks in advance. -------------------------------- Thank you for all your replies. I've decided to patch the system and schedule a reboot sometime soon which would destroy 241 days of uptime but then I have never really understood what all the hype was about a box being up for so long anyways :) A regular reboot (at most twice in 6 months) should be healthy for the box. The erroneous variables AGENTWORKS_DIR as well as CAIHPAD10 contain the wrong substring path: "/CA" which it should contain "/ca". These variables are in the INETD environment as mentioned by Darren Dunham but I am not sure how this is gonna help since the app is not spawned from there. However I should bounce the box after patching anyways since it's due for it. The "$AGENTWORKS_DIR/scripts/envset" script does not contain any setting related to the variables above and a grep on /etc/default/* comes up with nothing. Just a note to some people that the IF statement in the /etc/profile above will only set a variable if the variable is initially blank but it is not blank when /etc/profile is run therefore the inital incorrect value is preserved. Thank you all for your time and patience: Darren Dunham Pascal Grostabussiat Steve Sandau Ric Anderson Rich Kulawiec Frangois Legal Michael Schulte Crist Clark Johan Hartzenberg -------------------------------- On Thu, Apr 17, 2003 at 08:06:51AM -0700, Darren Dunham wrote: >Can you see if these variables are part of the inetd environment? > >ps -ef | grep inetd >/usr/ucb/ps eww <PID> -------------------------------- On Thu, Apr 17, 2003 at 02:23:17PM +0200, Johan Hartzenberg wrote: >Both those variables are used by TNG. They need to be defined for many TNG >agents and services binaries to run correctly. > >Both are normally set from /etc/profile, and they get added there by the >installation of TNG automatically. -------------------------------- On Thu, Apr 17, 2003 at 08:57:00AM -0400, Steve Sandau wrote: >It looks like the snippet you provide will set the variable >AGENTWORKS_DIR if it isn't already set. > >/etc/skel has system default .profile and .chhrc files. Beyond that, it >might be worth poking around in /etc/default... -------------------------------- On Thu, Apr 17, 2003 at 06:12:19AM -0700, Ric Anderson wrote: >Seems pretty obvious - the /etc/profile fragment >you included sets AGENTWORKS_DIR=/ca if >AGENTWORKS_DIR is not already set. Then, if the >file $AGENTWORKS_DIR/scripts/envset exists, it is >sourced by the current shell, and that could be the >place where CAIHPAD10 comes from. -------------------------------- On Thu, Apr 17, 2003 at 09:22:39AM -0400, Rich Kulawiec wrote: >Your article does not make it precisely clear what file contains this fragment: > >> # *---------------------------------------------- * >> # Modifications made by setupNSM for >> # Unicenter NSM Agent Technology >> and so on > >But if I understand you to say that this is in /etc/profile, then all users >(including new ones you've just created) will pick up the variables set there >when they login. -------------------------------- On Thu, Apr 17, 2003 at 03:29:09PM +0200, Frangois Legal wrote some HTML ONLY email that reads: You can check the files in /etc/default -------------------------------- On Thu, Apr 17, 2003 at 09:52:45AM -0500, Michael Schulte wrote: >> The variables in question are: >> >> CAIHPAD10=/CA/agents/data/hpa >> AGENTWORKS_DIR=/CA >> >> I've checked /etc/profile ~/.profile but this is the only useful portion: >> >> # *---------------------------------------------- * >> # Modifications made by setupNSM for >> # Unicenter NSM Agent Technology >> # *---------------------------------------------- * >> if [ "$AGENTWORKS_DIR" = '' ] >> then >> AGENTWORKS_DIR="/ca" >> export AGENTWORKS_DIR > >These lines set AGENTWORKS_DIR except the case is wrong. > > >> fi >> >> if [ -f "$AGENTWORKS_DIR"/scripts/envset ] >> then >> . "$AGENTWORKS_DIR/scripts/envset" > >This line executes the "script" envset, which probably sets CAIHPAD10. >Notice that this variable's value is a subdirectory of AGENTWORKS_DIR. > > >> fi >> >> # *---------------------------------------------- * >> # End of Modifications made by setupNSM for >> # Unicenter NSM Agent Technology >> # *---------------------------------------------- * -------------------------------- On Thu, Apr 17, 2003 at 11:36:23AM -0700, Crist Clark wrote: >Uh, well, it sure looks like that profile script is settinmg AGENTWORKS_DIR to >"/ca". Does the file it then loads, "/ca/scripts/envset," exist? Sugan Moodley Unix Systems Administrator - Midrange Support 2nd Floor ABSA Towers South, 160 Main Street, Johannesburg, 2001, South Africa PO Box 7735, Johannesburg, 2000, South Africa If little green men land in your back yard, hide any little green women you've got in the house. -- Mike Harding, "The Armchair Anarchist's Almanac" ______________________________________________ "The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorised to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking action in reliance of the contents of this information is strictly prohibited and may be unlawful. Absa is liable neither for the proper, complete transmission of the information contained in this communication, nor for any delay in its receipt, nor for the assurance that it is virus-free." _______________________________________________ sunmanagers mailing list sunmanagers@sunmanagers.org http://www.sunmanagers.org/mailman/listinfo/sunmanagersReceived on Tue Apr 22 04:45:59 2003
This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:09 EST