Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: net:appliance::session copy tftp bootflash:

by markkawika (Monk)
on Sep 19, 2009 at 04:22 UTC ( [id://796241]=note: print w/replies, xml ) Need Help??


in reply to net:appliance::session copy tftp bootflash:

Consider sending a command that includes all of the requested information already, so it doesn't prompt you for the missing info:
copy tftp://10.148.48.52/cat4500-ipbasek9-mz.122-31.SGA9.bin bootflash +:cat4500-ipbasek9-mz.122-31.SGA9.bin

Replies are listed 'Best First'.
Re^2: net:appliance::session copy tftp bootflash:
by boatperl (Initiate) on Sep 19, 2009 at 14:56 UTC

    Thank you markkawika, so simple it was brilliant. When you do this on console it still prompts for Destination filename. So I didn't think it would work. But using the below in the script works everytime:

    my $copy = ("copy tftp://10.148.48.52/cat4500-ipbasek9-mz.122-31.SGA +9.bin bootflash:cat4500-ipbasek9-mz.122-31.SGA9.bin"); $session_obj->input_log(*STDOUT); $session_obj->begin_privileged($userinfo[1]); $session_obj->cmd("$copy"); $session_obj->cmd("cat4500-ipbasek9-mz.122-31.SGA9.bin"); $session_obj->close;
    Thank you

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://796241]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-09-18 12:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (24 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.