UNSOLVED

yaribhas

updated

15 years ago

Y

yaribhas

2 Intern

•

134 Posts

0

1238

January 6th, 2012 10:00

saving the changes

Is there a way to run cfgsave command with no prompts in brocade

for example when I have made my zoning changes and run cfgsave I have to confirm it by saying "yes".

I want to make it such that it does not ask me and is set by default.

I have tried help cfgsave there is nothing in it.

  • christopher_ime

    6 Operator

    •

    1962 Posts

    392

    0

    Posted January 9th, 2012 17:00

    I am also unaware of anything native so would have to look at an external script to perform the same.  I found a PERL library, specifically the cmd() function, that accomplishes this.

    http://search.cpan.org/~lbendavid/Net-Telnet-Brcd-1.13/lib/Net/Brcd.pm

    [...]

    cmd

        my @results = $brcd->cmd("configShow");  my $ok      = $brcd->cmd("cfgsave");

    This function is used to send command to a brocade switch. And implement differents features:

    • The command tracks the continue question and answer 'yes'. The goal of this module is to be used in silent mode.

    [...]

  • Jun_Tan

    4 Apprentice

    •

    605 Posts

    394

    1

    Posted January 15th, 2012 18:00

    Please try with follow commands :

    echo yes | cfgsave

  • christopher_ime

    6 Operator

    •

    1962 Posts

    392

    0

    Posted January 15th, 2012 19:00

    Jun_Tan,

    Very nice, thank you!  Accomplishes exactly what the OP inquired about.