Hi All,
does anybody knows a way to get more complex banners (ASCII-Art, Colors and so on) into vyos?
I just found “\n” for newlines, but this is a bit clunky for complex banners.
Greetings
Matthias
Hi All,
does anybody knows a way to get more complex banners (ASCII-Art, Colors and so on) into vyos?
I just found “\n” for newlines, but this is a bit clunky for complex banners.
Greetings
Matthias
Just to give an example. To achieve this:
__ __ ___ ____
\ \ / / _ / _ \/ ___|
\ \ / / | | | | | \___ \
\ V /| |_| | |_| |___) |
\_/ \__, |\___/|____/
|___/
I had to code it like this:
set system login banner post-login '__ __ ___ ____\n\\ \\ / / _ / _ \\/ ___|\n \\ \\ / / | | | | | \\___ \\ \n \\ V /| |_| | |_| |___) |\n \\_/ \\__, |\\___/|____/\n |___/'
Note the double backslashes and the \n
’s.
I’m not sure what you are trying to say with this right now.
<snip>
And I hope you don’t mind if I steal that - nice work!
Well you asked for a way to get more complex banners like ASCII art into VyOS. I provided you with an example, that uses double backslashes (to achieve somewhat more complex ASCII art).
But maybe you mean something else, and if so, please feel free to elaborate on what you are trying to achieve specifically.
I asked for a better way of the already known clunky way. And you’re sending examples of doing it the clunky way…
To be fair to @marc_s I don’t think it was clear from your first post you considered complex line art like he provided an example of “clunky”.
Regardless, you could manually overwrite /etc/motd with what you want it to say.
You would have to execute post-commit scripts as well I think, otherwise it’ll get overwritten each time (though maybe not if you don’t set it in Vyos at all)
Note that I haven’t tested this, but /etc/motd contains on my systems what’s in the login banner command.
For example use ansible the simplest way “vyos_banner module”
I never thought I’d want to do this but I guess “because I can” is a good enough reason…
/config/scripts/commit/post-hooks.d/motd:
#!/usr/bin/sudo /bin/bash
MOTD="\033[1;94m
██ ██ ██ ██ ██████ ███████
██ ██ ██ ██ ██ ██ ██
██ ██ ████ ██ ██ ███████
██ ██ ██ ██ ██ ██
████ ██ ██████ ███████
\033[0m"
echo -e "$MOTD" > /etc/motd
Outputs a nice blue Vyos text on login.
Oh dear God (or whatever you might believe in or not =)
Lets not get into the < bold >< italic >< h3 >< blink >< marquee >< text color=pink>T3xt</ text></ marquee></ blink></ h3></ italic></ bold> nightmare of the late 1990’s
It’s certainly giving me BBS nostalgia… some of the old school ANSI art was pretty cool.
Yeah and some would bring you epilepsy even if you didnt have it previously
Great, that’s what I’m looking for - Thank you