For more details, please see ourCookie Policy.


Fibre Channel (SAN)

Reply
Super Contributor
Posts: 321
Registered: ‎04-04-2018

Re: setcontext: command not found

Hello,

 

as i mentioned it not issue of spaces or wrong syntax.

function setcontext is loaded from globalvariables once you open interactive session.

 

During remote sessions variables are not loaded (so function as well) so it's not recognized by bash.

 

All other command are created as links so there is no problem to access it as the env PATH is loaded during remote session.

Please mark this response as "Accept as Solution" if it answers your question.

Marian Bezeg
Regular Contributor
Posts: 173
Registered: ‎03-20-2018

Re: setcontext: command not found

Well, since I just modified a script, and it worked...

 

        DoEvents
        Application.SendKeys ("setcontext 128")
        DoEvents
        Application.SendKeys ("~"), True
        DoEvents
        Application.Wait (Now + TimeValue("0:00:01"))

 

Note the quotes.

Super Contributor
Posts: 321
Registered: ‎04-04-2018

Re: setcontext: command not found

Hello,

 

sure once you are not using remote shell but interactive it will works.

The problem is once you are using remote shell it will not load variables from profile.

 

KR 

 

Marian

Please mark this response as "Accept as Solution" if it answers your question.

Marian Bezeg
Frequent Contributor
Posts: 103
Registered: ‎01-19-2018

Re: setcontext: command not found

Right, "expect" scripts would also work the same way.
Highlighted
Frequent Visitor
Posts: 1
Registered: ‎04-24-2019

Re: setcontext: command not found

hi

when using ssh the /etc/profile is not set  and you can't . /etc/profile because theres a / in there

so

you need to use  i.e

ssh -f admin@$i fosexec --fid $virt -cmd "switchshow"

where $i is your switch and $virt is the Fabric ID (virtual machine ) you want to see

enjoy

 

 

 

Join the Broadcom Support Community

Get quick and easy access to valuable resources across the Broadcom Community Network.