From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH OSSTEST v2 11/20] Osstest/PDU: Add eth008.pm method to control the ARM rack PDU Date: Wed, 29 Oct 2014 16:39:16 +0000 Message-ID: <1414600756.2064.5.camel@citrix.com> References: <1414579268.29975.13.camel@citrix.com> <1414579302-6692-11-git-send-email-ian.campbell@citrix.com> <21585.5486.805960.961809@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21585.5486.805960.961809@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, 2014-10-29 at 16:27 +0000, Ian Jackson wrote: > Ian Campbell writes ("[PATCH OSSTEST v2 11/20] Osstest/PDU: Add eth008.pm method to control the ARM rack PDU"): > > This controls the eth008 relay board: http://www.robot-electronics.co.uk/htm/eth008tech.htm > > > > Due to the use of the CGI interface this requires firmware version 4+. > ... > > + # Create a netrc file to avoid putting l/p on command line > > + my ($passfh, $passfilename) = tempfile( UNLINK => 1 ); > > + print $passfh "machine $mo->{PDU} login $mo->{User} password $mo->{Pass}\n"; > > Where does tempfile(UNLINK=>1) create its files I had assumed it was in /tmp (perhaps with handling for $TMP and synonyms). TFD doesn't really say anything about it though. > and what deletes it if the script crashes ? Nothing (it just does it when the thing goes out of scope). > It might be better to use something in tmp/ > (presumably with the host name in the filename). See for example > ts-host-install which uses tmp/t..initrd. Good idea. > Or of course you could use LWP::UserAgent. I'll check that out. Ian/