From: Ian Jackson 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:27:26 +0000 Message-ID: <21585.5486.805960.961809@mariner.uk.xensource.com> References: <1414579268.29975.13.camel@citrix.com> <1414579302-6692-11-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1414579302-6692-11-git-send-email-ian.campbell@citrix.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 Campbell Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org 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 and what deletes it if the script crashes ? 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. Or of course you could use LWP::UserAgent. Ian.