[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH OSSTEST v2 11/20] Osstest/PDU: Add eth008.pm method to control the ARM rack PDU



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.<host>.initrd.

Good idea.

> Or of course you could use LWP::UserAgent.

I'll check that out.

Ian/


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.