Date: Tue, 23 May 2023 22:10:30 -0400 From: Garance A Drosehn <gad@FreeBSD.org> To: Jamie Landeg-Jones <jamie@catflap.org> Cc: freebsd-current@freebsd.org Subject: Re: MOTD is not created correctly (since 2022/02/18) Message-ID: <F997E470-775E-4F1F-BCC4-F7068F9AF42A@FreeBSD.org> In-Reply-To: <202305230318.34N3IOaX056503@donotpassgo.dyslexicfish.net> References: <202305230318.34N3IOaX056503@donotpassgo.dyslexicfish.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--=_MailMate_025F1A85-250B-4CB7-B6EB-3C2DC3C3949B_= Content-Type: text/plain; format=flowed; markup=markdown Content-Transfer-Encoding: quoted-printable On 22 May 2023, at 23:18, Jamie Landeg-Jones wrote: > I've just finally updated to 13-stable, and can't be the first to = > notice this?! > > /etc/rc.d/motd contains the line: > > uname -v | sed -e 's,^\([^#]*\) #\(.* = > [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > > Note the space before the "$" - needed because the uname -v output = > used > to have a trailing space. This was fixed and comitted on 2022/02/18: > > https://cgit.freebsd.org/src/commit/usr.bin/uname/uname.c?id=3D7e05fa3b= 449007adaa6e588ebb3b8d76f30b355c > > Since then, the sed doesn't match, so the uname(1) output is = > unchanged. > > There's no point altering the sed to work with both possibilities, so = > can > someone commit the fix of removing the ' ' before the '$' in = > /etc/rc.d/motd ? Not that it helps you much, but I did notice it and have an alternate version of rc.d/motd on my own systems. I had no particular attachment to the earlier format, so my motd starts out by printing the two lines of: ``` -KU 1302505 1302505 -b 18fa15f83c483db67b818e3a48bbb312908754b1 FreeBSD 13.2-STABLE (Garance-13x) #0 -- Fri May 5 17:53:55 EDT 2023 ``` (that first line is the output from ```printf ' -KU %s -b %s\n' "$(uname -KU)" "$(uname -b)"``` ) But I thought that committing that would trigger a bikeshed debate, so I also have an option to produce the output we previously had. And given that no one seemed to be complaining about the "full uname" version, I figured I had an option for that too. And then I thought all these = options were overkill and would trigger and even longer debate, so I never = brought the ideas forward. :) -- = Garance Alistair Drosehn =3D drosih@rpi.edu Lead Developer @rpi and gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA --=_MailMate_025F1A85-250B-4CB7-B6EB-3C2DC3C3949B_= Content-Type: text/html Content-Transfer-Encoding: quoted-printable <!DOCTYPE html> <html> <head> <meta http-equiv=3D"Content-Type" content=3D"text/xhtml; charset=3Dutf-8"= > </head> <body><div style=3D"font-family: sans-serif;"><div class=3D"markdown" sty= le=3D"white-space: normal;"> <p dir=3D"auto">On 22 May 2023, at 23:18, Jamie Landeg-Jones wrote:</p> <blockquote style=3D"margin: 0 0 5px; padding-left: 5px; border-left: 2px= solid #777777; color: #777777;"> <p dir=3D"auto">I've just finally updated to 13-stable, and can't be the = first to notice this?!</p> <p dir=3D"auto">/etc/rc.d/motd contains the line:</p> <p dir=3D"auto">uname -v | sed -e 's,^([^#]<em>) #(.</em> [1-2][0-9][0-9]= [0-9]).<em>/([^]</em>) $,\1 (\3) #\2,'</p> <p dir=3D"auto">Note the space before the "$" - needed because = the uname -v output used<br> to have a trailing space. This was fixed and comitted on 2022/02/18:</p> <p dir=3D"auto"><a href=3D"https://cgit.freebsd.org/src/commit/usr.bin/un= ame/uname.c?id=3D7e05fa3b449007adaa6e588ebb3b8d76f30b355c" style=3D"color= : #777777;">https://cgit.freebsd.org/src/commit/usr.bin/uname/uname.c?id=3D= 7e05fa3b449007adaa6e588ebb3b8d76f30b355c</a></p> <p dir=3D"auto">Since then, the sed doesn't match, so the uname(1) output= is unchanged.</p> <p dir=3D"auto">There's no point altering the sed to work with both possi= bilities, so can<br> someone commit the fix of removing the ' ' before the '$' in /etc/rc.d/mo= td ?</p> </blockquote> <p dir=3D"auto">Not that it helps you much, but I did notice it and have = an alternate<br> version of rc.d/motd on my own systems. I had no particular attachment<b= r> to the earlier format, so my motd starts out by printing the two lines<br= > of:</p> <pre style=3D"margin-left: 15px; margin-right: 15px; padding: 5px; backgr= ound-color: #F7F7F7; border-radius: 5px 5px 5px 5px; overflow-x: auto; ma= x-width: 90vw;"><code style=3D"margin: 0 0; border-radius: 3px; backgroun= d-color: #F7F7F7; padding: 0px;"> -KU 1302505 1302505 -b 18fa15f83c483= db67b818e3a48bbb312908754b1 FreeBSD 13.2-STABLE (Garance-13x) #0 -- Fri May 5 17:53:55 EDT 2023 </code></pre> <p dir=3D"auto">(that first line is the output from<br> <code style=3D"margin: 0 0; padding: 0 0.25em; border-radius: 3px; backgr= ound-color: #F7F7F7;">printf ' -KU %s -b %s\n' "$(uname -KU)"= ; "$(uname -b)"</code><br> )</p> <p dir=3D"auto">But I thought that committing that would trigger a bikesh= ed debate, so I<br> also have an option to produce the output we previously had. And given<b= r> that no one seemed to be complaining about the "full uname" ver= sion, I<br> figured I had an option for that too. And then I thought all these optio= ns<br> were overkill and would trigger and even longer debate, so I never brough= t<br> the ideas forward. :)</p> </div><div id=3D"1E5069B8-B094-48FD-8A96-D66CC42C52FB"><!DOCTYPE html><di= v dir=3D"auto" style=3D"color: rgb(0, 0, 0); font-family: sans-serif; fon= t-style: normal; font-variant-caps: normal; font-weight: normal; letter-s= pacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-= transform: none; white-space: pre-wrap; widows: auto; word-spacing: 0px; = -webkit-text-stroke-width: 0px;">-- = </div><div dir=3D"auto" style=3D"color: rgb(0, 0, 0); font-family: sans-s= erif; font-style: normal; font-variant-caps: normal; font-weight: normal;= letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0= px; text-transform: none; white-space: pre-wrap; widows: auto; word-spaci= ng: 0px; -webkit-text-stroke-width: 0px;">Garance Alistair Drosehn = =3D drosih@rpi.edu </div><div dir=3D"auto" style=3D"color: rgb(0, 0, 0); font-family: sans-s= erif; font-style: normal; font-variant-caps: normal; font-weight: normal;= letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0= px; text-transform: none; white-space: pre-wrap; widows: auto; word-spaci= ng: 0px; -webkit-text-stroke-width: 0px;">Lead Developer @rpi = and gad@FreeBSD.org </div><div dir=3D"auto" style=3D"color: rgb(0, 0, 0); font-family: sans-s= erif; font-style: normal; font-variant-caps: normal; font-weight: normal;= letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0= px; text-transform: none; white-space: pre-wrap; widows: auto; word-spaci= ng: 0px; -webkit-text-stroke-width: 0px;">Rensselaer Polytechnic Institut= e; Troy, NY; USA</div></div> <div class=3D"markdown" style=3D"white-space: normal;"> </div> </div> </body> </html> --=_MailMate_025F1A85-250B-4CB7-B6EB-3C2DC3C3949B_=--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F997E470-775E-4F1F-BCC4-F7068F9AF42A>