Project

General

Profile

Bug #26097

Preserve new lines in MOTD

Added by Chris Heerschap about 1 year ago. Updated 11 months ago.

Status:
Resolved
Priority:
Nice to have
Assignee:
William Grzybowski
Category:
OS
Target version:
Seen in:
Sprint:
Severity:
New
Backlog Priority:
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

Seen on multiple systems.

ChangeLog Required:
No

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

Revision 403c54ec (diff)
Added by William Grzybowski about 1 year ago

fix(rc): preserve new lines

Ticket: #26097

History

#1 Updated by Dru Lavigne about 1 year ago

  • Assignee changed from Release Council to William Grzybowski

William: please load balance.

#2 Updated by William Grzybowski about 1 year 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 about 1 year ago

  • Subject changed from MOTD destroys newlines to Preserve new lines in MOTD

#4 Updated by Dru Lavigne 12 months ago

  • Status changed from Ready For Release to Resolved

#5 Updated by Chris Heerschap 12 months 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 12 months 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 12 months 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 12 months ago

#9 Updated by Joe Maloney 11 months 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.

Also available in: Atom PDF