12-20-2013 04:21 AM
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
Solved! Go to Solution.
12-24-2013 01:22 AM
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]
12-24-2013 01:22 AM
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]
01-02-2014 12:38 AM
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
01-02-2014 01:11 AM
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
01-02-2014 01:30 AM
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?
01-02-2014 03:13 AM
Hi steffen,
Note : I think "\" before each star "*" would help
Can you try something like this:
\*\*\*\*\*\*\*\*\* WARNING \*\*\*\*\*\*\*\*\*\*\*\*\\*
\* from room UG-1201 \*
NOTE :
Thanks-
Afroz
01-02-2014 03:24 AM
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>
01-02-2014 03:27 AM
will check and contact you if I find more information.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide