motd: Don't trim surrounding whitespace from the --motd file input.

This commit is contained in:
Greg Wedow 2016-08-21 12:17:30 -04:00 committed by Andrey Petrov
parent d2f08490f7
commit 87d38405ae

View File

@ -152,7 +152,7 @@ func main() {
if err != nil {
fail(7, "Failed to load MOTD file: %v\n", err)
}
motdString := strings.TrimSpace(string(motd))
motdString := string(motd)
// hack to normalize line endings into \r\n
motdString = strings.Replace(motdString, "\r\n", "\n", -1)
motdString = strings.Replace(motdString, "\n", "\r\n", -1)