Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Community Member

LMS4 Config Baseline - Multiline Command HowTo

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
Cisco Employee

LMS4 Config Baseline - Multiline Command HowTo

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 ****
7 REPLIES
Cisco Employee

LMS4 Config Baseline - Multiline Command HowTo

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 ****
Community Member

Re: LMS4 Config Baseline - Multiline Command HowTo

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

Cisco Employee

LMS4 Config Baseline - Multiline Command HowTo

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 ****
Community Member

Re: LMS4 Config Baseline - Multiline Command HowTo

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?

Cisco Employee

LMS4 Config Baseline - Multiline Command HowTo

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 ****
Community Member

Re: LMS4 Config Baseline - Multiline Command HowTo

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>

Cisco Employee

Re: LMS4 Config Baseline - Multiline Command HowTo

will check and contact you if I find  more information.

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****
331
Views
0
Helpful
7
Replies
CreatePlease to create content