HomeFreeBSD

/etc/rc.d/motd: Update to accommodate changes in uname(1) and newvers.sh

Description

/etc/rc.d/motd: Update to accommodate changes in uname(1) and newvers.sh

The recent changes to the uname(1) command removed trailing spaces for
better POSIX conformance, but it broke the regular expression used by
the motd script which expected it. This commit addresses this by removing
the requirement, as it is no longer present.

Additionally, a recent change in newvers.sh introduced a new format for
uname -v, which omited the build number and build dates to improve
reproducible build support. This commit adds support for this new format.

Reported-by: Jamie Landeg-Jones <jamie@catflap.org>
Reviewed-by: imp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D40225

Details

Provenance
delphijAuthored on May 23 2023, 4:23 AM
Differential Revision
D40225: motd: Adapt with recent changes.
Parents
rG5a9c724847f9: Correct size parameter to strncmp
Branches
Unknown
Tags
Unknown