cancel
Showing results for 
Search instead for 
Did you mean: 

Script to add banner for multiple devices

Script to add banner for multiple devices

EtherNation_Use
Contributor II
Create Date: May 21 2012 8:03AM

I would like to create script that will ad banner to my devices.

Currentli have issues with diferent commands on XOS and Extremeware.

Also when i add in script something like:

configure banner before-login

************************************************************

UNAUTHORIZED ACCESS

************************************************************



It gets stuck and cannot execute.

(from Davor_Gadanac)
9 REPLIES 9

EtherNation_Use
Contributor II
Create Date: Sep 2 2012 4:49PM

I've sent you the script today William.

I think you should remove your email from the above post and maybe change your username too because it will be likely to get gathered by spammers. (from Eugen_NAIMAN)

EtherNation_Use
Contributor II
Create Date: Aug 31 2012 12:00PM

Can you send me the file?
william.f.haden@noaa.gov
thanks. (from Bill_Haden)

EtherNation_Use
Contributor II
Create Date: May 27 2012 7:16PM

You're quite right - this is how it should look. Better get my attached file and test that.

The upload failed anyway - I'll try to send you a PM with the script attached.

About your second issue - Ridgeline has a variable called $isExos which returns "True" if the switch is an XOS one; otherwise it returns "False".

An example:

IF (!$match($isExos,true) ) THEN
Echo "$deviceIP is an EXOS switch."
ELSE
Echo "$deviceIP is NOT an EXOS switch"
ENDIF

Good luck,

EDIT: unfortunately I can't attach any files to PM and I can't attach any files to the post here. If you want, you can PM me your email address and I'll do it that way.

(from Eugen_NAIMAN)

EtherNation_Use
Contributor II
Create Date: May 22 2012 1:56AM

Hello,

If i get it right, script should look like this:

configure banner before-login

************************************************************ "LF"

UNAUTHORIZED ACCESS "LF"

************************************************************ "LF"

LF is with<> without quotes, of course.

When i run script i'm getting "%% Invalid input detected at '^' marker." and marker points to nothing.

Also, when i copy command and paste it directly to CLI on SW everything works OK.

Do you have suggestions how to create script that will recognize SW if it is XOS or Extremeware and use diferent commands (Extremeware does not have before-login option). (from Davor_Gadanac)

EtherNation_Use
Contributor II
Create Date: May 21 2012 4:31PM

Keep in mind that in order to "end" a banner input, you need to hit "enter" twice because hitting it once, will only advance to the next line.

I have absolutely no problem configuring banners. What I can advise you: create a new script, use LF as end lines and after the banner content just add twice LF and it will work properly.

(from Eugen_NAIMAN)
GTM-P2G8KFN