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

LMS4 Config Baseline - Multiline Command HowTo

STEFFEN NEUSER
Level 4
Level 4

How could we implement Multiline Commands like Banners into LMS4 Config Baseline templates?

If this will not be posible how will it be possible to can run Template Center templates containing Multiline Commands

from a parameterfile, ultra importent none interactive and unattented?

Steffen

1 Accepted Solution

Accepted Solutions

AFROJ AHMAD
Cisco Employee
Cisco Employee
HI Steffen,

Multi-line commands like banner need special handling.  Each newline in the banner needs to be replaced with "". Say for example: If your banner is: "************************* WARNING ************************************** This is a private system and only authorized individuals are allowed! All others will be prosecuted to the fullest extent of the law! Your template would be: + banner motd "************************* WARNING ************************************** This is a private system and only authorized individuals are allowed!All others will be prosecuted to the fullest extent of the law! ** Refer this forum for easier understanding, https://supportforums.cisco.com/message/638950#638950 http://www.cisco.com/en/US/docs/net_mgmt/ciscoworks_lan_management_solution/4.2/user/guide
/configuration/baselineconfig.pdf

Thanks-

Afroz

[Do rate the useful post]

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****

View solution in original post

7 Replies 7

AFROJ AHMAD
Cisco Employee
Cisco Employee
HI Steffen,

Multi-line commands like banner need special handling.  Each newline in the banner needs to be replaced with "". Say for example: If your banner is: "************************* WARNING ************************************** This is a private system and only authorized individuals are allowed! All others will be prosecuted to the fullest extent of the law! Your template would be: + banner motd "************************* WARNING ************************************** This is a private system and only authorized individuals are allowed!All others will be prosecuted to the fullest extent of the law! ** Refer this forum for easier understanding, https://supportforums.cisco.com/message/638950#638950 http://www.cisco.com/en/US/docs/net_mgmt/ciscoworks_lan_management_solution/4.2/user/guide
/configuration/baselineconfig.pdf

Thanks-

Afroz

[Do rate the useful post]

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****

Hi Afroj,

thx for your hint and happy new year.

BTW: it was also working using + at each line:

+ banner motd "********* WARNING ***********

+ * this is a banner for [#hostname#] *

+ * from room [#room#] *

+ ...

another question: ist it possible to match the trailing * after parameters to a fixed position, so you will get a well formatted box even all variables have different string length?

********* WARNING **************

* this is a banner for sw-1    *

* from room 12                 *

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

********* WARNING **************

* this is a banner for sw-333  *

* from room UG-1201            *

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

Steffen

Hi Steffen,

Wish you and your Family  a Very Happy New Year !!!

Trailing ***  should not cause any issue , try giving the way it is on the device..

Thanks-

Afroz

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****

Hi Afroj,

Im afraid a little misunderstanding of the question. Its not regarding the kind of box rendering char, that can possibly confuse the prompt sensing algorythm, its more about the well formatting of the final baner box:

fixed position of *

********* WARNING **************

* this is a banner for sw-1   *

* from room 12             *

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

********* WARNING **************

* this is a banner for sw-333     *

* from room UG-1201              *

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

formatted:

********* WARNING **************

* this is a banner for sw-1    *

* from room 12                 *

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

********* WARNING **************

* this is a banner for sw-333  *

* from room UG-1201            *

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

is there a possibility to reach this formatting with baseline config?

Hi steffen,

Note :  I think "\" before each star "*" would help

Can you try something like this:

\*\*\*\*\*\*\*\*\* WARNING \*\*\*\*\*\*\*\*\*\*\*\*\\*

\* this is a banner for sw-333  \*

\* from room UG-1201            \*

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

NOTE :

Thanks-

Afroz

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****

No doesnt help, but I think we still out of sync regarding the question:)

+ * this is a banner for [#hostname#] <* only this char need to be positioned at column 55 or dynamic the same line length as above line to get a nice ending box regardless the length of variable content>

+ * from room [#room#] <* same as above>

will check and contact you if I find  more information.

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****