cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1537
Views
0
Helpful
0
Replies

Apply Banner (MOTD/Login) from Macro?

BrianSekleckiGE
Level 1
Level 1

All:

 

Is there a magic escape character to use if applying a multi-line 'banner' command from within a macro?

 

I've tried "^", "%", "+" so far to no avail.

 

When I attempt to apply the Macro global, it fails to read the second line of the macro.

 

I can confirm this behavior on :

- Stratix 5700 / IE4000 running: Version 15.2(7)E

- Catalyst C2960X running: Version 15.2(7)E1

 

--------------------------

 

IE4000(config)# macro global apply MACRO_CONFIG_BANNER


Enter TEXT message. End with the character '%'.  <----- That should not be there

[Control+C] <----- Break out

%
^
% Invalid input detected at '^' marker.

Enter TEXT message. End with the character '%'.

%

[Control+C]
^
% Invalid input detected at '^' marker.

 

!

!

 

!

IE4000# sh run | begin MACRO_CONFIG_BANNER
!

macro name MACRO_CONFIG_BANNER

banner login %
#####################################################################
#
# You have reached device [ $(hostname) ] on line [ $(line) ]
#
# This device is property of: [...]
# Unauthorized access is strictly prohibited.
#
#####################################################################
%


banner motd %
#####################################################################
#
# Login Complete !
#
# All rights reserved. 
#
#####################################################################
%

!
!
@
!

 

Google is coming up short on suggestions.  Thanks for any advice, ~Brian

0 Replies 0