Bug #26097
Preserve new lines in MOTD
Seen on multiple systems.
Description
In 11u4, the MOTD no longer respects multi-line MOTD.
For example, my MOTD:
_ _ _ ____ | \ | | / \ / ___| | \| | / _ \ \___ \ | |\ |/ ___ \ ___) | |_| \_/_/ \_\____/
Upon login, this gets reported like:
FreeBSD 11.0-STABLE (FreeNAS.amd64) #0 r321665+25fe8ba8d06(freenas/11.0-stable): Mon Sep 25 06:24:11 UTC 2017 FreeNAS (c) 2009-2017, The FreeNAS Development Team All rights reserved. FreeNAS is released under the modified BSD license. For more information, documentation, help or support, go here: http://freenas.org _ _ _ ____ | \ | | / \ / ___| | \| | / _ \ \___ \ | |\ |/ ___ \ ___) | |_| \_/_/ \_\____/
Obviously not a huge issue, but it's a recent thing and I figured worth mentioning.
Associated revisions
History
#1
Updated by Dru Lavigne over 3 years ago
- Assignee changed from Release Council to William Grzybowski
William: please load balance.
#2
Updated by William Grzybowski over 3 years ago
- Status changed from Unscreened to Ready For Release
- Priority changed from No priority to Nice to have
- Target version set to 11.1-BETA1
#3
Updated by Dru Lavigne over 3 years ago
- Subject changed from MOTD destroys newlines to Preserve new lines in MOTD
#4
Updated by Dru Lavigne about 3 years ago
- Status changed from Ready For Release to Resolved
#5
Updated by Chris Heerschap about 3 years ago
Applying the changes to the ix-motd file on my 11u4 system restores the multi-line output (had I realized it was that easy I could have done the fix myself) but I have discovered that the MOTD banner doesn't preserve leading whitespace on the first line. Example:
_ _ _ ____ | \ | | / \ / ___| | \| | / _ \ \___ \ | |\ |/ ___ \ ___) | |_| \_/_/ \_\____/
submits okay in the System Advanced tab, but switching to another tab and back has the MOTD Banner field rendered without the leading space in the first line only:
_ _ _ ____ | \ | | / \ / ___| | \| | / _ \ \___ \ | |\ |/ ___ \ ___) | |_| \_/_/ \_\____/
An easy workaround is to replace the first space with any character, then subsequent spacing is preserved - but I'm guessing it's another quoting issue.
Again, not critical.
#6
Updated by William Grzybowski about 3 years ago
Chris Heerschap wrote:
Applying the changes to the ix-motd file on my 11u4 system restores the multi-line output (had I realized it was that easy I could have done the fix myself) but I have discovered that the MOTD banner doesn't preserve leading whitespace on the first line. Example:
[...]
submits okay in the System Advanced tab, but switching to another tab and back has the MOTD Banner field rendered without the leading space in the first line only:
[...]
An easy workaround is to replace the first space with any character, then subsequent spacing is preserved - but I'm guessing it's another quoting issue.
Again, not critical.
Since this ticket was already resolved can you open a new one with that different issue, please?
#7
Updated by Chris Heerschap about 3 years ago
Yes, certainly, I wasn't sure what was the best approach, so I just commented here. I'll open a new ticket.
#8
Updated by Chris Heerschap about 3 years ago
https://bugs.freenas.org/issues/26344 opened - thank you!
#9
Updated by Joe Maloney about 3 years ago
- Needs QA changed from Yes to No
- QA Status Test Passes FreeNAS added
- QA Status deleted (
Not Tested)
FreeBSD 11.1-STABLE (FreeNAS.amd64) #0 r321665+815c6537f68(freenas/11-stable): Mon Oct 30 22:14:29 UTC 2017 | \ | | / \ / ___| | \| | / _ \ \___ \ | |\ |/ _ \ _) | |_| \_/_/ \_\____/
FreeNAS (c) 2009-2017, The FreeNAS Development Team
All rights reserved.
FreeNAS is released under the modified BSD license.
For more information, documentation, help or support, go here:
http://freenas.org
Welcome to FreeNAS
_ _ _ __
Warning: settings changed through the CLI are not written to
the configuration database and will be reset on reboot.