From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Browett, Darren" Newsgroups: gmane.os.tru64.managers Subject: Summary: 5.1a - behaviour of su Date: Fri, 14 Mar 2003 09:14:51 -0800 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <8423DAC11EF82D469CF20CE341CC4EDFB2B158@EXCHANGE.private.coquitlam.bc.ca> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1047662098 2988 80.91.224.249 (14 Mar 2003 17:14:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 14 Mar 2003 17:14:58 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Fri Mar 14 18:14:54 2003 Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.22.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 18tslC-0000iH-00 for ; Fri, 14 Mar 2003 18:14:22 +0100 Original-Received: (qmail 2106 invoked by uid 5); 14 Mar 2003 17:15:00 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 2097 invoked by uid 49493); 14 Mar 2003 17:14:59 -0000 Original-Received: from dbrowett@coquitlam.ca by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.54. spamassassin: 2.50-cvs. Clear:SA:0(-0.6/5.0):. Processed in 0.407108 secs); 14 Mar 2003 17:14:59 -0000 Original-Received: from unknown (HELO emroute1.cind.ornl.gov) (160.91.4.119) by 0 with SMTP; 14 Mar 2003 17:14:59 -0000 Original-Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HBR00H1S18X7Q@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Fri, 14 Mar 2003 12:14:58 -0500 (EST) Original-Received: from EXCHANGE.private.coquitlam.bc.ca (fpxa.private.coquitlam.bc.ca [142.219.32.70]) by emroute1.cind.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HBR00E8A18RXV@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Fri, 14 Mar 2003 12:14:52 -0500 (EST) Original-To: Tru64-Unix-Managers X-MIMEOLE: Produced By Microsoft Exchange V6.0.6249.0 Thread-Topic: Summary: 5.1a - behaviour of su Thread-Index: AcLqSf1XYAZ3zXDFRsi4ytf2FLMIkwAAq0fg content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Xref: main.gmane.org gmane.os.tru64.managers:3647 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:3647 Thank you for all your quick responses : Carl Christopher Bavington @ Langley [Carl.Bavington@ntl.com] Binkley Robert - rbinkl [Robert.Binkley@acxiom.com] gmb-mcg-it-unix-admin [gmb-mcg-it-unix-admin@cardinal.com] The solution that worked was from Spider.Boardman@Orb.Nashua.NH.US His response : Your example: ORACLE_ENV=3D/ora/env/Oracle.env /bin/su oracle -c ". $ORACLE_ENV ; $DBS/ractrl stop" uses "" throughout, which means that $DBS must be set in the *invoking* environment in order to be part of that command. One fix would look like this: ORACLE_ENV=3D/ora/env/Oracle.env /bin/su oracle -c ". $ORACLE_ENV ; "'$DBS/ractrl stop' The '' usage defers the $DBS expansion to the shell run as the oracle user, which will do so after finishing the '.' command. A couple of people suggested /bin/su - oracle, this did not make any difference. Darren -----Original Message----- From: Browett, Darren=20 Sent: Friday, March 14, 2003 8:52 AM To: Tru64-Unix-Managers Subject: 5.1a - behaviour of su As part of my backup procedures, I make a call to scripts for shutting down my databases. This script has worked with 4.0f but is not working with 5.1a/pk3. The syntax is=20 ORACLE_ENV=3D/ora/env/Oracle.env /bin/su oracle -c ". $ORACLE_ENV ; $DBS/ractrl stop" When I run the command I get the following output : ksh: /ractrl: not found To me this indicates that $DBS is not being resolved (if that is the correct term). =20 I did change the command to /bin/su oracle -c ". $ORACLE_ENV ; printenv" And $DBS is defined. Has anybody else seen this behaviour ?? Thanks Darren ------------------------------------------------------------------------ -------------------------------------------------- Darren Browett P.Eng This message was transmitted Data Administrator using 100% recycled electrons=20 Information and Communication Technology City of Coquitlam=20 P:(604)927 - 3614=20 E:dbrowett@city.coquitlam.bc.ca=20 ------------------------------------------------------------------------ ---------------------------------------------------=20