# Very unhappy with FreeBSD 13 MOTD



## Supertim (Aug 7, 2021)

This may not be the right audience, but I'm very displeased with FreeBSD 13 changing the traditional /etc/motd logic and turning it into what I see as over-engineered triviality which contradicts the unix philosophy. I don't know where is the right place to express my thoughts about it, sorry if this isn't one of them.

IMO, if someone wanted to make MOTD more generic/flexible - they should have written a port to automate that, rather than breaking half a century of unix motd implementations and deviating further from all other unix-like platforms; for what though? for motd? because they didn't want to periodically change a config in /etc/? I don't understand this, and until I do this will continue to seem whimsical and unnecessary.

Does anyone have a rationalization for changing something so simple yet fundamental at the cost of half century of unix lineage and interchangeability?


----------



## eternal_noob (Aug 7, 2021)

I don't know anything about this topic. *gets popcorn*


----------



## Supertim (Aug 7, 2021)

Historically, it is known motd resides in /etc/motd. This is true for all unix platforms that I know of. If a new user looks up documentation online concerning motd, they can basically click any link and chances are they will stumble into a correct way to do it which would work on freeBSD. If the user has books written about unix, they will learn a way that would work on freeBSD.

As of freeBSD 13, this changed.

MOTD is now over-engineered and sourced from /var/run/motd, which is a file which gets re-generated on startup from /etc/motd.template, which in turn gets a kernel version force-inserted into it at startup (plus some misguided switches that can control _some_ of this behavior via sysrc):

From motd(5):

*NAME*
*motd* – file containing message(s) of the day

*DESCRIPTION*
     The file /var/run/motd is normally displayed by login(1) after a user has
     logged in but before the shell is run.  It is generally used for
     important system-wide announcements.  During system startup, a line
     containing the kernel version string is prepended to /etc/motd.template
     and the contents are written to /var/run/motd.

     /var/run/motd can be updated without a system reboot by manually
     restarting the motd service after updating /etc/motd.template:
           service motd restart

     Individual users may suppress the display of this file by creating a file
     named “.hushlogin” in their home directories or through login.conf(5).
----

I don't understand why _all that_ needed to happen, at the cost of making trivial prior knowledge and parity with other unix and unix-like systems irrelevant. It diverges the platform away from the philosophical principles that hold it together.

It feels thoughtless to me. For starters, I simply wish to know what in fact was thought when this decision was accepted, and why it was worth doing this.


----------



## eternal_noob (Aug 7, 2021)

Supertim said:


> I simply wish to know what in fact was thought when this decision was accepted, and why it was worth doing this.


Since the Wireguard scandal? I don't want to speculate...

Btw: Has Matthew Macy still his commit bit?


----------



## Supertim (Aug 7, 2021)

eternal_noob said:


> Since the Wireguard scandal? I don't want to speculate...
> 
> Btw: Has Matthew Macy still his commit bit?


Not that I want to change subjects, but can you imagine what happens in the closed-source world? Nightmares.


----------



## Geezer (Aug 7, 2021)

For better or worse, of all the _stuff_ that has changed in Freebsd over the last twenty years, is this really a big thing?


----------



## grahamperrin@ (Aug 7, 2021)

Supertim said:


> This may not be the right audience,



<https://forums.FreeBSD.org/threads/79815/post-506924>



Supertim said:


> … rationalization …



FreeBSD 13 and /etc/motd: it's gone! – Luca Ferrari – Open Source advocate, human being

⚙ D26654 Support immutable motd when /var/run is tmpfs


----------



## Supertim (Aug 7, 2021)

Geezer said:


> For better or worse, of all the _stuff_ that has changed in Freebsd over the last twenty years, is this really a big thing?


In a way, that is exactly my point/concern. Was _this_ really worth deviating from how motd was done across all major unix and unix-like platforms for decades? It's another "weird quirk" that foreign unix platform user has to adopt to in order to use freeBSD. It's something elegant and simple being turned into something needlessly complicated.

grahamperrin thanks a lot, the Luca article didn't quite do it for me (found it independently earlier, plausible but too speculative) but the second link really illustrated how much thought went into fracturing lineage from unix ways over some edge cases. Feels like trivial problems are being solved by sacrificing elegance of the original implementation in favor of unnecessarily over engineered design. Super disappointed.


----------



## Geezer (Aug 7, 2021)

Unix is dead, I am afraid. Though many of us may remember when Unix was an operating system, now it is merely a _standard_ for certification (no doubt at a cost). I do not even think FreeBSD has been certified.


----------



## Geezer (Aug 7, 2021)

Dead




Still Alive


----------



## friendshipendedwithlinux (Aug 7, 2021)

Geezer said:


> View attachment 10922
> Still Alive


And thank god it is , god knows what kind of C++/Rust/asm dev we'd be doing otherwise XD


----------



## grahamperrin@ (Aug 7, 2021)

Supertim said:


> … the traditional /etc/motd logic …



I don't know what was traditional. No mention of motd in <https://www.freebsd.org/releases/13.0R/relnotes/>.

Is what's in 13.0-RELEASE the commit that was made in August 2019? <https://cgit.freebsd.org/src/log/?qt=grep&q=motd>

If not, can you find the relevant commit?


----------



## mark_j (Aug 7, 2021)

Supertim said:


> This may not be the right audience, but I'm very displeased with FreeBSD 13 changing the traditional /etc/motd logic and turning it into what I see as over-engineered triviality which contradicts the unix philosophy. I don't know where is the right place to express my thoughts about it, sorry if this isn't one of them.
> 
> IMO, if someone wanted to make MOTD more generic/flexible - they should have written a port to automate that, rather than breaking half a century of unix motd implementations and deviating further from all other unix-like platforms; for what though? for motd? because they didn't want to periodically change a config in /etc/? I don't understand this, and until I do this will continue to seem whimsical and unnecessary.
> 
> Does anyone have a rationalization for changing something so simple yet fundamental at the cost of half century of unix lineage and interchangeability?


FreeBSD no longer has inetd running by default with telnet the default means of ingres into the system. Imagine that?


----------



## kpedersen (Aug 7, 2021)

Geezer said:


> Still Alive






To complete the AT&T collection. This one is alive, just vastly unpopular 

I would say that UNIX as a design still represents the *only* system that has truly stood the test of time. So if operating systems do not adhere to its simplicity, they will disappear and be outlived by the UNIX "idea".

This MOTD change is pretty messy in my opinion. Since so few of us use its new functionality, it probably should have been a port. Not a massively big deal on its own but it does contribute to a slight unraveling of a clean, deterministic system.

As an aside, OpenBSD has managed to keep their traditional /etc/motd so it couldn't have been an absolute life changing improvement.


----------



## mer (Aug 7, 2021)

mark_j said:


> FreeBSD no longer has inetd running by default with telnet the default means of ingres into the system. Imagine that?


How dare they change that!

As an aside, Ubuntu 20.04 has a /var/run/motd.dynamic with a /var/run/motd.d directory 

Sometimes there are reasons for taking something simple and making it more complicated.  As long as the reasons were discussed and not made in a vacuum (as with fortune), so what?  I can agree or disagree with the reasons, I can use or not use the "thing" that changed.
But complaining that documentation about an older version does not match the reality of the current version seems to me, a bit counterproductive.


----------



## Tieks (Aug 7, 2021)

mer said:
			
		

> Sometimes there are reasons for taking something simple and making it more complicated.



Don't remember where I read it, but that said it had to do with rights. Operators writing a login message no longer need to write to /etc. Well, maybe...


----------



## mer (Aug 7, 2021)

Tieks said:


> Don't remember where I read it, but that said it had to do with rights. Operators writing a login message no longer need to write to /etc. Well, maybe...


And that would be an excellent reason.  One can run at a higher security level, which makes a lot of system level directories read-only.  No reason for MOTD to actually need root level privs to modify since it is really a system announcement that everyone reads but few pay attention to.


----------



## drhowarddrfine (Aug 7, 2021)

Mac OSX (UNIX)...still alive.


----------



## Alain De Vos (Aug 7, 2021)

Isn't motd simple compared to systemd


----------



## Geezer (Aug 7, 2021)

drhowarddrfine said:


> Mac OSX (UNIX)...still alive.


Didn't Mac OS (not the original pitiful failure) begin its life from Freebsd, and then got certified because Apple has got enough cash?


----------



## msplsh (Aug 7, 2021)

I'm sorry, can't you just disable this service and it still reads out a static file?

Also, what the heck is it with people just deciding what's "UNIX" or not?  I don't see anything in the TOC here (since this is being held up as some kind of bible) that says MOTD has to be a static file in order to be "UNIX."  Things _can_ be simple or they can not be.  If you add the complexity on top to gain features, this doesn't make it less UNIX or whatever.


----------



## Geezer (Aug 7, 2021)

Look, whether it is motd or motd.template, just chuck in a bit of ascii art and forget about it.


----------



## Geezer (Aug 7, 2021)

Seeing as the boot menu has now got the flashy logos (sometimes), there are the old logos that could be used as acii art. You could have a beastie motd.


----------



## drhowarddrfine (Aug 7, 2021)

Geezer said:


> Didn't Mac OS (not the original pitiful failure) begin its life from Freebsd, and then got certified because Apple has got enough cash?


OSX has the Mach kennel and parts of BSD userland. Since it is heavily used in the film industry, I presume that is why they wanted to maintain compatibility with Unix for systems from SGI and others


----------



## kpedersen (Aug 7, 2021)

I think "Snow Leopard" was the last version of Mac OS X to have a standalone server build. I think this was also the last time that Apple claimed UNIX certified.

Just all down hill from there


----------



## msplsh (Aug 7, 2021)

kpedersen said:


> the last time that Apple claimed UNIX certified.



No.


----------



## kpedersen (Aug 7, 2021)

msplsh said:


> No.


Ah that's interesting. I was more referring to their marketing. In the older releases, their pages like this: https://www.apple.com/uk/macos/big-sur/

Would always claim UNIX certified. It seems that they lost interest in that being a unique selling point in more recent years.

Edit: I found this blast to the past 
https://web.archive.org/web/20080221214230/http://www.apple.com/server/macosx/technology/unix.html


----------



## msplsh (Aug 7, 2021)

drhowarddrfine said:


> why they wanted to maintain compatibility with Unix for systems from SGI and others


No, it's because it's based on NEXTSTEP, which is Mach/BSD4.x released in 1989.  Conformance was obtained in 2007 with version 10.5, which kind of makes sense because macOS 10.0-10.4 was kind of a work in progress.


----------



## Supertim (Aug 7, 2021)

To me, unix has always philosophically stood aside from other platforms in many different ways - one among which is the elegance of simplicity. Making things more complicated for <reasons> is a matter to wonder whether the solution was the right one for the problem. Making complicated things simple without losing function is very difficult work, and I personally have deep appreciation for this effort.

FreeBSD's recognition of some of these philosophies (actions speak louder than words here) is what appealed to me and differentiated it from other unix-like platforms: it's not "frankensteined" like many linux distros are, it's not over-engineered, it doesn't feel thoughtless or sloppy, it doesn't have a licensing complex, it feels smart and approachable. It's simple enough to understand and flexible enough to do everything I want, and its ways of doing things have historically been fairly well rationalized (at least all things I cared about).

This MOTD change is another step in unraveling these ideas in freeBSD, an evolutionary wart. The fixes resulting from this change should have been applied in a way that requires admins who need special functionality to jump through hoops, rather than the other way around.

I'm not implying that progress shouldn't happen and things shouldn't evolve, but this approach to trivial problem solving is breaking one of the fundamental appeals of this system to me and tells me which direction things are headed.


----------



## tux2bsd (Aug 7, 2021)

It was and is a stupid change. (see below before overreacting)

I discovered it because it was one of the things I had to adjust in a script I have that performs some post OS install tasks on FreeBSD.  https://forums.FreeBSD.org/threads/freebsd-13-annoyances.79815/post-506924


----------



## drhowarddrfine (Aug 7, 2021)

Ya' know someone could get on the mailing list and ask the devs why rather than sit here complaining with awe and wonder about it.


----------



## mer (Aug 7, 2021)

drhowarddrfine said:


> Ya' know someone could get on the mailing list and ask the devs why rather than sit here complaining with awe and wonder about it.


Seems like a rather odd, trollish hill to die on.  The point about taking something simple and making it complex is valid, but a lot of the rest?


----------



## Alain De Vos (Aug 7, 2021)

I'm not convinced motd is complex now. Maybe it's just has more functionality.
But just like sendmail i would personally see it out of base and into ports.


----------



## tux2bsd (Aug 7, 2021)

Alain De Vos said:


> I'm not convinced motd is complex now. Maybe it's just has more functionality.
> But just like sendmail i would personally see it out of base and into ports.


It is no longer a plain text file in /etc/motd , it has become more complex.

Your idea is halfway there, I'll improve on it:  by default /etc/motd text file as it was.  A more complex motd could then be installed via ports/pkg if desired.


----------



## tux2bsd (Aug 7, 2021)

Supertim just be aware in these forums the high message count club are very cliquey.  Also worth noting, in the forums "Staff Member" is just a super admin on the forum (nothing more).

Depending on your background, e.g. systemd PTSD, it may sway your reaction to the motd change.

Anyway there is a lot of great technical info in these forums so don't give up.


----------



## tux2bsd (Aug 7, 2021)

p.s. doing this suited my needs:

```
#12 (already in place)
test -f /etc/motd && sed -i '' '2,$d' /etc/motd
#13 (wtf no /etc/motd??)
test -f /etc/motd || touch /root/.hushlogin
```
And that's all nice and simple AFTER finding out it changed and taking the TIME to see if it affected others and FINDING forum posts mentioning '.hushlogin' being the right thing to do...


----------



## bakul (Aug 8, 2021)

/etc/motd was useful in the days when unix was a time sharing system with many people logged in and the admins wanted to broadcast a message to all. It’s pretty much useless these days when everyone has their own personal machine. That is why it is growing weeds!


----------



## kpedersen (Aug 8, 2021)

bakul said:


> It’s pretty much useless these days when everyone has their own personal machine. That is why it is growing weeds!


It was so useless and unused that some guy saw this as his chance to over-engineer the crap out of it whilst no-one was looking 

Open-source is strange sometimes. I personally think it was someone who liked all the junk that Ubuntu spits out when you ssh in and wanted to emulate similar functionality / noise.

From here: https://reviews.freebsd.org/D26654

It looks like the weirdness can be disabled via:


```
# service motd disable

# /etc/rc.conf
update_motd="NO"
```

Once I have confirmed, I will just add this to my growing installer script. The number of these hacks have grown more in the last two years than the 10 years before it! Luckily it is still considerably less than the madness that is Linux.


----------



## mark_j (Aug 8, 2021)

Tieks , Yep, not buying the security bit, after all they say modify the template in /etc anyway.

Looking at my work's analysis for when/if we upgrade to 13, one of the  issues is actually this. We're legally obliged to have certain notices so it's essential. Whether it's a show stopper we'll find out when someone gets to that particular issue. I think I was being too flippant with my original comment.

So what I'm saying is these things have real-world impacts.

(Oh, and yes, .hushlogin works, but we lock user accounts with read-only permission to their login files and have scripts that run and remove things like .hushlogin, .forward etc).


----------



## mark_j (Aug 8, 2021)

kpedersen said:


> It was so useless and unused that some guy saw this as his chance to over-engineer the crap out of it whilst no-one was looking


It does look like that, doesn't it. Has anyone managed to find the actual change for this and why it went ahead?



kpedersen said:


> Open-source is strange sometimes. I personally think it was someone who liked all the junk that Ubuntu spits out when you ssh in and wanted to emulate similar functionality / noise.
> 
> From here: https://reviews.freebsd.org/D26654https://reviews.freebsd.org/D26654


But this is post the event. I would love to read the rationale behind this change.

If you look here, you can understand the logic behind some. If I point out the discussion raised by Ed Maste about removing ftpd, there is an obvious discussion. I cannot find the same for this motd change.
Perhaps it was just a thought bubble of Warner (Losh) and Conrad (Meyer?)?

Is this motd as a service something systemd/linux does? 
Edit:
I checked, (I don't run 13 yet), and it's not really a service as in some daemon running, it's just an install of /var/run/motd to /etc/motd using the template. Why it's done this way? Who knows.

It's only ever going to be impactful at boot or if you physically run the script to "re-activate" it. The status-quo should be maintained by simply adding, by default, `sysrc update_motd=no` and ensuring it is always done for every release into the future.

Edit 2:
I played around. Deleting /var/run/motd and re-creating a soft link to /etc/motd in /var/run works. There are obviously other ways around this.



kpedersen said:


> It looks like the weirdness can be disabled via:
> 
> 
> ```
> ...


BUT, it's disappointing that it's heading that way.
There's lots of stuff that can be fixed in FreeBSD and they screw around with motd? Seriously?


----------



## tux2bsd (Aug 8, 2021)

kpedersen said:


> update_motd="NO"


I checked my script and I have that too... I'd already forgotten that step.  Painful.


----------



## Geezer (Aug 8, 2021)

tux2bsd said:


> just be aware in these forums the high message count club are very cliquey



Gosh!


----------



## ralphbsz (Aug 8, 2021)

kpedersen said:


> I would say that UNIX as a design still represents the *only* system that has truly stood the test of time.


Nah, OS/360 is about 10-15 years older, and still being actively developed and sold. It still makes IBM an enormous amount of money. And a while ago I heard that GCOS (the old General Electric OS from the early 60s) is also still being sold. Both have stood a longer test of time.

Regarding what "Unix" even means: If Dennis and Ken looked at a modern Unix machine (any flavor, whether it's proprietary or open source, and I'm explicitly including *BSD and Linux in that), they would not recognize very many things. Dennis can't do that any longer; Ken is still around, and last I heard, he used a Chromebook (!) as his personal machine: That is a computer that doesn't even expose an operating system, only a web browser. Claiming that something is "the Unix way" is pretty silly.

Now, the above doesn't mean that I particularly like or dislike the new /etc/motd mechanism; not having tried it yet, I don't have strong opinions.


----------



## hruodr (Aug 8, 2021)

That FreeBSD Developers are making motd more complicated shows that either they are neglecting important things or that there are too much unnecessary developers. It is like the story of lua in the boot loader. My opinion.


----------



## Deleted member 30996 (Aug 8, 2021)

Get out a text editor and change /etc/motd:


```
FreeBSD 12.2-RELEASE-p7 GENERIC 

                           ,          ,
                          /(          )\
                          \\ \\___   / /
                          /- _  `-/  ' !
                          (/\\/ \\ \\   /
                          / /   | `    \
                          O O   ) /    |
                         `-^--'`<     '
                        (_.)  _  )   /
                         `.___/`    /
                           `-----' /
              <----.     __ / __   \\
              <----|====O)))==) \\) /====
              <----'    `--' `.__,' \\
                            |        |
                            \\       /
                      ______( (_  / \\______
                    ,'  ,-----'   |        \\
                    `--{__________)        \\/
```


----------



## bakul (Aug 8, 2021)

ralphbsz said:


> Ken is still around, and last I heard, he used a Chromebook (!) as his personal machine


I find that hard to believe. At least in 2010 he used MacOS + plan9ports, as per Russ Cox in





						[9fans] What operating systems are the google guys using?
					






					groups.google.com
				





> The standard set up for a Plan 9 aficionado here seems to
> be a Mac or Linux machine running Plan 9 from User Space
> to get at sam, acme, and the other tools. Rob, Ken, Dave, and I
> use Macs as our desktop machines, but we're a bit of an exception.


----------



## Geezer (Aug 8, 2021)

Always carry a notebook with you.






And don't forget the pencil.


----------



## mark_j (Aug 8, 2021)

Geezer said:


> Gosh!


I know, right?
I think clique is more often used in a negative context (as seems to be here), but to me, a clique is exactly what the FreeBSD community should be.
Let's get cliquey!  Or should it be for computer people, clicky?


----------



## mark_j (Aug 8, 2021)

Trihexagonal said:


> Get out a text editor and change /etc/motd:
> 
> 
> ```
> ...


And you'll see nothing as /etc/motd is not used unless you stay on 12.


----------



## fernandel (Aug 8, 2021)

mark_j said:


> And you'll see nothing as /etc/motd is not used unless you stay on 12.


In 13 I have in /etc/login.conf

```
:welcome=/etc/motd:\
```
and it works.


----------



## tux2bsd (Aug 8, 2021)

Trihexagonal said:


> Get out a text editor and change /etc/motd:


If it is a new install of FreeBSD 13 then there is nothing to change, but you can add that file if you like and then proceed to scratch your head.

mark_j the cliquiness I don't like is where they pile into a thread and derail it from the subject instead of just ignoring the thread that they weren't all that interested in to begin with...

To get back on-topic, I'll repeat myself about the proper way motd should have been _modernised_:
By default /etc/motd text file, as it was.  A more complex motd could then be installed via ports/pkg if desired.


----------



## kpedersen (Aug 8, 2021)

ralphbsz said:


> Nah, OS/360 is about 10-15 years older, and still being actively developed and sold. It still makes IBM an enormous amount of money. And a while ago I heard that GCOS (the old General Electric OS from the early 60s) is also still being sold. Both have stood a longer test of time.


I'm not convinced it has a market share comparable to Unix (or even DOS for that matter). This certainly doesn't make it dead or unprofitable by any means but it does suggest that it might have gained a foothold as a good system *before* Unix really shaped the IT world. Once Unix (as a design) did come in, everything (with a good success) has seemed to have copied it. Even VMS and NT in a number of ways.


ralphbsz said:


> Regarding what "Unix" even means: If Dennis and Ken looked at a modern Unix machine (any flavor, whether it's proprietary or open source, and I'm explicitly including *BSD and Linux in that), they would not recognize very many things. Dennis can't do that any longer; Ken is still around, and last I heard, he used a Chromebook (!) as his personal machine: That is a computer that doesn't even expose an operating system, only a web browser. Claiming that something is "the Unix way" is pretty silly.


Considering that Brian Kernighan was happy running Windows NT. It is mainly just as a thin client to access a "productive" operating system. So I think it is the same, they are just using Chromebooks as cheap Sun Ray clients. After all, that is all they are really good for. Surely for your own uses, you don't just rely on a Chromebook's local capabilities? You can barely get any good (i.e Diagram) tools for them. Too locked down and weird.


----------



## hruodr (Aug 8, 2021)

tux2bsd said:


> To get back on-topic, I'll repeat myself about the proper way motd should have been _modernised_:
> By default /etc/motd text file, as it was. A more complex motd could then be installed via ports/pkg if desired.


There was nothing to modernise. The bloating did not bring anything other than a lost, of transparency
and simplicity. What sane person can desire that?! Although it may be considered an insignificant change,
it is a very bad signal about the future of FreeBSD.


----------



## grahamperrin@ (Aug 8, 2021)

grahamperrin said:


> Is what's in 13.0-RELEASE the commit that was made in August 2019? <https://cgit.freebsd.org/src/log/?qt=grep&q=motd>



It seems that the move from /etc occurred in 2018, then generation from template in January 2019. 

Seeking _motd_ in subject lines in my archive of freebsd-current: 

no complaint during the two years before 13.0 was released
one brief thread for a simple improvement to documentation.


----------



## drhowarddrfine (Aug 8, 2021)

mer said:


> Seems like a rather odd, trollish hill to die on.  The point about taking something simple and making it complex is valid, but a lot of the rest?


I'm not taking any position. What I'm saying is, there are posts here complaining and asking about this issue but no one has made the effort to go to the source to find the reason and answer. The reasons and answers lie on the mailing list and irc. So go ask there since no one here has either qualified answer or reason.


----------



## guyyur (Aug 8, 2021)

There was one complaint after the commit in the svn-src-head mailing list.


			svn commit: r350184 - in head: libexec/rc/rc.d release/picobsd/tinyware/login share/man/man5 usr.bin/login


----------



## grahamperrin@ (Aug 8, 2021)

drhowarddrfine said:


> … The reasons and answers lie on the mailing list and irc. …



I think, the most obvious benefit is already in one of the commits: 

*… running 'service motd restart' rather than rebooting. …*


----------



## hruodr (Aug 8, 2021)

grahamperrin said:


> I think, the most obvious benefit is already in one of the commits:
> 
> *… running 'service motd restart' rather than rebooting. …*


You think? Perhaps you did not think enough?

For what was "rebooting" necessary when changing motd?

Change your /etc/motd in old FreeBSD, log out, log in, what motd do you see, the old one or the new one?


----------



## grahamperrin@ (Aug 8, 2021)

hruodr said:


> Perhaps you did not think enough?



Previously stated: 



grahamperrin said:


> I don't know what was traditional.



I looked at the manual page and the commit. If the manual page is misleading, someone can suggest an improvement.


----------



## a6h (Aug 8, 2021)

kpedersen said:


> Once I have confirmed, I will just add this to my growing installer script. The number of these hacks have grown more in the last two years than the 10 years before it! Luckily it is still considerably less than the madness that is Linux.


BTW, the "two years" observation is correct!

P.S. If I can pick an old book, e.g. 4.3BSD/1989, to figure out why "_stack was zero-filled ... then it wasn't ...then it was ..._", then it's UNIX(‡).
But, if I have to dig in YouTube/Discord to learn how to press ENTER key, then that's something else.
_-- Please don't take my words(‡) too literally!_


----------



## Alain De Vos (Aug 8, 2021)

Just install a freebsd jail, no packages. And you get sendmail for free. And port 25 gets occupied.
For me that is bad design.


----------



## ralphbsz (Aug 8, 2021)

bakul said:


> I find that hard to believe.


Quite possible that things have changed. 10 years ago, Chromebooks were not where they are today. I tested them for education around that time, and found them woefully inadequate. Today, a significant fraction (half? third? three quarters?) of professional software engineers I know use them for daily development work. Also quite possible that he uses more than one machine; I could imagine having a personal machine, a professional coding machine, and a professional administrative machine, and different OSes for those might make sense to some.


----------



## Alain De Vos (Aug 8, 2021)

I own a laptop with two cores. It's just good for browsing internet with linux.
The video is integrated so it does not boot any bsd.
My 5-cent, for serious work you need more cores on the cpu and this includes power consumption.


----------



## hruodr (Aug 8, 2021)

It seems /etc/motd is not original BSD or UNIX, at some point NetBSD and FreeBSD introduced it in the
man pages, and perhaps in the system.

That /etc/rc appends a line containing the kernel version string is in my opinion bad design.


----------



## bakul (Aug 8, 2021)

hruodr said:


> It seems /etc/motd is not original BSD or UNIX, at some point NetBSD and FreeBSD introduced it in the
> man pages, and perhaps in the system.


/etc/motd is traced back to version 2 of unix. See https://minnie.tuhs.org/pipermail/tuhs/2018-March/014704.html

In fact you can check this for yourself since dspinellis has put most of the unix bits online: https://github.com/dspinellis/unix-history-repo/blob/Research-V2-Snapshot-Development/cmd/login.s

Search for /etc/motd. The TUHS mailing list archives has other interesting historical tidbits in various messages.


----------



## rotor (Aug 8, 2021)

mer said:


> The point about taking something simple and making it complex is valid



If the new MOTD "feature" were reverted in 13.1, what would be lost?  Who asked for the "feature"?

Those are two questions I had when I encountered the "feature."


----------



## grahamperrin@ (Aug 8, 2021)

rotor said:


> the new MOTD "feature"



Which "one"? 

The move away from /etc, or something else?

Please "be" specific.


----------



## rotor (Aug 8, 2021)

grahamperrin said:


> Which "one"?



By "feature" I mean the entirety of the change in MOTD from 12.x to 13.0.

The specifics, but not limited to:  the service, the template.

I presume that before a developer can add a new "feature" such as this, that there needs to be some manner of documentation why the new "feature" is needed and/or beneficial.

Perhaps if that document were added to this thread, it would be helpful in understanding the reasoning that, frankly, I am having difficulty seeing.


----------



## hruodr (Aug 8, 2021)

I have a debian server running.

/etc/motd does not contain the line with kernel info,
but after login you see first this kernel info.

I think, it must be left to the admin to add the first
line with kernel info.


----------



## grahamperrin@ (Aug 8, 2021)

rotor said:


> new "feature"



New "use" of speech marks. What was wrong with the old way?


----------



## msplsh (Aug 8, 2021)

Seems to be better than using fsync.

Attempt #1: Sponsored by: Dell EMC Isilon

Attempt #2: current style


----------



## rotor (Aug 8, 2021)

Sure would have been nice if Dell EMC had written what problem they were trying to solve with fsync...

To my eyes, this "feature" looks like a solution without a problem.


----------



## grahamperrin@ (Aug 8, 2021)

grahamperrin said:


> <https://cgit.freebsd.org/src/log/?qt=grep&q=motd>



▶ ▶ ⚙ D20701 rc.d/motd: Update motd more robustly "… appropriate fsyncs to persist …"


----------



## mark_j (Aug 8, 2021)

drhowarddrfine said:


> I'm not taking any position. What I'm saying is, there are posts here complaining and asking about this issue but no one has made the effort to go to the source to find the reason and answer. The reasons and answers lie on the mailing list and irc. So go ask there since no one here has either qualified answer or reason.


The end user should not be surprised by such changes, something FreeBSD used to follow POLA.
The end user should not need to go joining mailing lists to find out such things.
Is this a process issue, a lack of attention to a change log, a view the change was too trivial, whatever I do not know?

Nothing will change now so it is up to the user to adapt.


----------



## rotor (Aug 8, 2021)

Dell EMC probably wanted to have a commit to FreeBSD, so they chose the MOTD non-problem to fix.  
Then their fix was not complex enough, so someone else took it upon themself to introduce a more complex daemon-based solution to a problem that originally did not really exist.

Makes sense now.


----------



## bakul (Aug 9, 2021)

There was some recent news about "useless" commits to the Linux kernel by some Huawei employees. Speculation was that this was for some KPI (key performance indicators) credit. Any commits by an employee to the Linux kernel would surely count as "meaningful" work, right?! Not saying this is what is going on WRT the motd commit but the thought did cross my mind. May be commits should be checked for such uselessness?


----------



## msplsh (Aug 9, 2021)

rotor said:


> MOTD non-problem



Reading the mailing list points to real issues setting up chroot jails or something similar.


----------



## mark_j (Aug 9, 2021)

rotor said:


> Sure would have been nice if Dell EMC had written what problem they were trying to solve with fsync...
> 
> To my eyes, this "feature" looks like a solution without a problem.


Oh no...  Has Poeterring got a commit bit?


----------



## ralphbsz (Aug 9, 2021)

rotor said:


> Dell EMC probably wanted to have a commit to FreeBSD, so they chose the MOTD non-problem to fix.


Nonsense. Isilon (now a division of Dell/EMC) have been heavy users of FreeBSD for at least 10 years. Their storage appliance is built around a modified version of FreeBSD, using their own cluster file system.

These people are professional software engineers, not amateurs. They don't write software unless there is a reason for it.



> Makes sense now.




Although Bakul's theory is even more laughable. The level of paranoia in this forum is close to the point where participating in it no longer makes sense.


----------



## bakul (Aug 9, 2021)

msplsh said:


> Reading the mailing list points to real issues setting up chroot jails or something similar.


That should be an opportunity to *simplify* things, not complicate them further.


----------



## hruodr (Aug 9, 2021)

As I wrote before, it is /etc/rc what adapted /etc/motd to contain the first line with the kernel info.
If you change the kernel without rebooting (laugh) or write a completely new motd without
the kernel info, you needed to reboot to get the first line correct. It is in my opinion bad design.

The change in 13 solves this bad design with worse design.

The best solution would have been to leave the admin to write the first line, if he wants it.
Just to delete the code in /etc/rc that change motd. The other solution would be debians
one, it shows the info, but not from motd. But as a service you can now perhaps disable 
this mechanism without deleting in rc, perhaps an advantage.


----------



## drhowarddrfine (Aug 9, 2021)

mark_j That has absolutely nothing to do with what I said. To explain further, what I said was, if you want to know the answer to the question, "Why?", go to the mailing lists or irc and ask the people who did this that question because no one here has the answer. 

That the end user might be bothered by this has nothing to do with anything I said.


----------



## tux2bsd (Aug 9, 2021)

> tux2bsd said:
> To get back on-topic, I'll repeat myself about the proper way motd should have been _modernised_:
> By default /etc/motd text file, as it was. A more complex motd could then be installed via ports/pkg if desired.





hruodr said:


> There was nothing to modernise.



I agree.  If someone did want to expand on motd, for whatever crazy reason, then it should be done externally to the OS (i.e. ports/pkg).


----------



## Deleted member 30996 (Aug 9, 2021)

mark_j said:


> And you'll see nothing as /etc/motd is not used unless you stay on 12.


What will happen if he opens /var/run/motd with a text editor?


Tell me, tell me, tell me do...


Because it looks much the same from the man page:

From OP's post:

```
DESCRIPTION
The file /var/run/motd is normally displayed by login(1) after a user has
logged in but before the shell is run. It is generally used for
important system-wide announcements. During system startup, a line
containing the kernel version string is prepended to /etc/motd.template
and the contents are written to /var/run/motd.

/var/run/motd can be updated without a system reboot by manually
restarting the motd service after updating /etc/motd.template:
service motd restart

Individual users may suppress the display of this file by creating a file
named “.hushlogin” in their home directories or through login.conf(5).
```

From my FreeBSD 12.2-RELEASE-p7 man page:

```
DESCRIPTION
     The file /etc/motd is normally displayed by login(1) after a user has
     logged in but before the shell is run.  It is generally used for
     important system-wide announcements.  During system startup, a line
     containing the kernel version string is prepended to this file.

     Individual users may suppress the display of this file by creating a file
     named ".hushlogin" in their home directories or through login.conf(5).
```


----------



## tux2bsd (Aug 9, 2021)

Trihexagonal said:


> What will happen if he opens /var/run/motd with a text editor?


He will have that file open in a text editor...


----------



## SirDice (Aug 9, 2021)

Note that if you create a /etc/motd and don't have a template yet, it will automatically get converted:

```
if [ ! -f "${TEMPLATE}" ]; then
                # Create missing template from existing regular motd file, if
                # one exists.
                if [ -f "${COMPAT_MOTD}" ]; then
                        sed '1{/^FreeBSD.*/{d;};};' "${COMPAT_MOTD}" > "${TEMPLATE}"
                        chmod $PERMS "${TEMPLATE}"
                        rm -f "${COMPAT_MOTD}"
                else
                        # Otherwise, create an empty template file.
                        install -c -o root -g wheel -m ${PERMS} /dev/null "${TEMPLATE}"
                fi
                # Provide compatibility symlink:
                if [ ! -h "${COMPAT_MOTD}" ]; then
                        ln -sF "${TARGET}" "${COMPAT_MOTD}"
                fi
        fi
```


----------



## Geezer (Aug 9, 2021)

Trihexagonal said:


> Tell me, tell me, tell me do...





Oh, sorry. Am I on the wrong thread?

Forget about a text motd, what about a video message of the day? With dancing girls too.


----------



## hruodr (Aug 9, 2021)

Trihexagonal said:


> What will happen if he opens /var/run/motd with a text editor?


And edit it? It will be probably overwritten at next boot.


----------



## SirDice (Aug 9, 2021)

Geezer said:


> Forget about a text motd, what about a video message of the day?



I just force everyone to watch blinkenlights by adding `telnet towel.blinkenlights.nl` to /etc/profile  



hruodr said:


> It will probably overwritten at next boot.


Yes. Maybe you should read /etc/rc.d/motd? You should create a /etc/motd.template.


----------



## hruodr (Aug 9, 2021)

SirDice said:


> Yes. Maybe you should read /etc/rc.d/motd? You should create a /etc/motd.template.


This is what I understood from the man page. I am running 11.4.


----------



## obsigna (Aug 9, 2021)

Reading the whole thread, and motd(5), I am still not sure about what’s the canonical way of turning off the „message(s) of the day“ altogether. While I like the OS information, I dislike aleatory messages of Drew in special, and in general any stuff which you get without having asked for.

In the moment I have an empty /etc/motd.template, is this the correct way of suppressing any of the messages?

My son uses Windows 10 for gaming, and I set up the machine in 2019 and ever since I only made sure that it becomes updated frequently, without paying too much attention to the UI. Yesterday, I entered into my admin account of said machine, and suddenly in the task bar I recognized a weather and news item, that must have happened in the course of the 21H1 update, WTF, a visual motd. And the best of all, it came with similar obstacles like our new motd(5) on how to turn this off.

I am not so much concerned about the exact mechanism, I dislike the missing/hidden OFF setting/button.


----------



## SirDice (Aug 9, 2021)

obsigna said:


> In the moment I have an empty /etc/motd.template, is this the correct way of suppressing any of the messages?


In that case the MOTD will only contain the FreeBSD version number.

If you don't want an MOTD at all, `rm /var/run/motd` and `sysrc update_motd="NO"`


----------



## hruodr (Aug 9, 2021)

SirDice said:


> ....  and `sysrc update_motd="NO"`


This is also possible in 11.4.


----------



## SirDice (Aug 9, 2021)

hruodr said:


> This is also possible in 11.4.


Has a slightly different function on anything before 13.0.


----------



## rotor (Aug 9, 2021)

ralphbsz said:


> These people are professional software engineers, not amateurs. They don't write software unless there is a reason for it.



So then, what is that reason?

I've still not seen a use case for this change.  I've still not seen a list of problems that needed to be solved. Was this implementation the only possible way to solve the problems?  Could there have been another less-intrusive solution?

Lots of people seem to be defending a change, yet no one seems to know the reason the change was made.

Isn't that odd?


----------



## hruodr (Aug 9, 2021)

rotor said:


> I've still not seen a use case for this change. I've still not seen a list of problems that needed to be solved. Was this implementation the only possible way to solve the problems? Could there have been another less-intrusive solution?


`rc` now does not modify a file on /etc, but on /var/run. It has sense to have a read only /etc, and anyway
/var/run must be writable. The "solution" was to make the rc mechanism more complicated: why not, if
it is jet complicated enough? In OpenBSD the code that modify /etc/motd is stil on /etc/rc. And still there
are other files in /etc that are modified by the system, you know the old resolv.conf that is modified by
`dhclient`.


----------



## msplsh (Aug 9, 2021)

rotor said:


> what is that reason



Fsync issues in jails or something.  The problem was something along the lines of "I update this file in a esoteric but supposedly supported way, and it doesn't work."



rotor said:


> Was this implementation the only possible way to solve the problems? Could there have been another less-intrusive solution?



This gets into "Did you just volunteer for coding up solution #3?" and "This discussion was held in 2019."

"I like text files" and "This was unnecessary" are not good arguments against a vendor who sponsored (aka probably paid a developer) a fix to a problem.  You could email the developers for more specifics but you're close to running up to a poisoned well here.  Why should anybody bother explaining it to you if they expect you to just use the explanation as a club against them and not deliver Solution #3?  Go look at the phabricator logs to see that there's a lot of back and forth and problem solving that you'd be signing up for.


----------



## mer (Aug 9, 2021)

I wonder if you did a git blame on the files would you get back to a commit message that has pertinant information?

On the other hand is there any more horse left to flog?


----------



## rotor (Aug 10, 2021)

msplsh said:


> This gets into



To my eyes, what it actually gets into is that "open source" is not "open process."

The user community does not seem to know the reasons behind this rather drastic change to a minor, yet significant aspect of FreeBSD.

It is all the more troubling that the reasons for the change are not apparent.
Why are they being hidden?

Are the reasons that undefensible?


----------



## msplsh (Aug 10, 2021)

The reasons seem to be technical, so the technical people are dealing with them.  Nobody is having a technical problem with having to do MOTD updates differently.  If you _were_, then get on the mailing lists and articulate them.

/etc/passwd has changed from a flatfile to a multi-flatfile process.  What's the big deal with this less significant thing?  Nothing.


----------



## rotor (Aug 10, 2021)

msplsh said:


> the reasons seem to be technical, so the technical people are dealing with them



"seem to be"

Oh please.

You totally misunderstand the audience you are addressing.

I repeat -- what are the reasons?  What process allowed this change?

(why is it so difficult to get those simple questions answered?  Is this the wireguard fiasco repeated?)


----------



## msplsh (Aug 10, 2021)

You seemed to understand the "not an open process" concept pretty well, so... what's so difficult about people not feeling the need to explain themselves to people who aren't stakeholders?  Dell is a large company presumably asking a reasonable request.  Fsync seemed like a real easy solution.  Turns out it wasn't, so they took this measure.  Reading between the lines is not enough?

End users don't participate in the dev process.  It doesn't matter what the process is to you because what are you going to do about it _now_ that you would have done earlier?


----------



## tux2bsd (Aug 10, 2021)

rotor said:


> why is it so difficult to get those simple questions answered?


As I mentioned earlier there is a group of people that prefer to derail a discussion.


msplsh said:


> End users don't participate in the dev process.


The same can be said for most software.  It does not stop the end user feeling or knowing that a poor decision was made, people can talk about that if they want.

Hell.   /etc/motd could have been moved to /etc/motd.original (if /etc/motd existed) and /etc/motd could have been made a file that contained message "/etc/motd is not what it was, please read man page blah"

I tend to remove/truncate the motd anyway so my needs are simple.  I can appreciate some people want more,  that should be done adding additional software.

What annoyed me most was the unwritten: fuck you figure it out.


----------



## hruodr (Aug 10, 2021)

A similar mechanism was in 386BSD:









						386bsd/rc.local at 2.0 · 386bsd/386bsd
					

386BSD. Contribute to 386bsd/386bsd development by creating an account on GitHub.




					github.com
				




Was it really necessary?

In any case, rc.local is a file that can be modified at taste. Its contents is not an important part 
of the system, but just a configuration file.


----------



## forquare (Aug 10, 2021)

hruodr said:


> That FreeBSD Developers are making motd more complicated shows that either they are neglecting important things or that there are too much unnecessary developers. It is like the story of lua in the boot loader. My opinion.


I think this kind of position is hilarious.  When you have a development team under contract you can tell them what to do, when you are relying on people volunteering their time you can't say "don't work on that _thing_ that seems important to you, instead work on _this_".  
Sure, you can _ask_ folk to focus on something specific, you can _ask_ committers to spend their time reviewing certain changes over other ones.  But if you demand I'm sure you'll find volunteers will stop volunteering.

When we get companies volunteering their work there has to be an appreciation that whatever they are volunteering is _helping them_ and maybe we benefit. FreeBSD doesn't have to accept it, of course, but I'd like to think that there is discussion about changes - I suspect there is but there are too many open/half-open places for it to take place: IRC, possibly multiple mailing lists, reviews.freebsd.org, hallway track at conferences, meetups, etc.


----------



## hruodr (Aug 10, 2021)

forquare said:


> I think this kind of position is hilarious.


Fact is for example that there are always more important packages that are not maintained,
and always more changes that surprise users using FreeBSD since long ago.


----------



## rotor (Aug 15, 2021)

msplsh said:


> Dell is a large company presumably asking a reasonable request.



So you admit you do not know whether or not their request is reasonable.  And why does being a large company automatically make a request reasonable?  Is a  bully always right?

What i know so far, there was some unknown issue with /etc/motd. (still unknown, after days of asking what it was)

Dell EMC came up with some bizarre solution that requires a daemon.

What is not known - what other alternative solutions, besides fsync, were examined, if any.


Could it be possible that the root problem was in what Dell EMC was trying to do with /etc/motd, and not really the process of updating motd?  Has anyone discussed that aspect?

So, yes, I acknowledge that FreeBSD is open source but closed process.

The wireguard fiasco has shown that a closed process involving companies may not be as good as all have hoped....

Did FreeBSD learn from that?

Jus' sayin'


----------



## ralphbsz (Aug 15, 2021)

Sorry, but we have to dial the artificial anger and rhetoric down a little bit. There is ZERO evidence that Dell EMC was acting as a bully. There is zero evidence that this decision is bad. The claim of "days of asking" is irrelevant, as this forum is not where answers will be found, if any. The solution is not bizarre: a daemon is the standard solution for boot-related things (such as recording the OS version). Open source does not imply that every newbie on the forum has to be involved in decisions. And I see no parallels with wireguard. Nor was wireguard a fiasco, I would describe it as a typical example of schedule slip and project setback that happens in software engineering all the time. Finally, just to be clear: the party involved here is not Dell EMC (the whole company), but Isilon, a division of Dell EMC, and a heavy FreeBSD user and contributor.

Personally, I have no opinion on this change, and no horse in the race. But we need to all be a little respectful, and stop being so paranoid and self centered.


----------



## grahamperrin@ (Aug 15, 2021)

+1



ralphbsz said:


> Isilon



… and the move from /etc/ (not sponsored) was much earlier than the fix that was sponsored by Isilon.


----------



## chungy (Aug 15, 2021)

forquare said:


> I think this kind of position is hilarious.


Honestly, the whole thread is hilarious.

This is such a minute change it's perplexing that it's even worth worrying about. The as-is instrumentation makes editing /etc/motd.template so trivially close to what you want anyway, why not go with that?

You could go a step further and remove the motd service from your system and go back to ye olde ways. It's your system, after all. Heck, you could even fork FreeBSD to have "FreeBSD without motd.template"


----------



## hruodr (Aug 15, 2021)

It is not hilarious. The original poster asked:



Supertim said:


> Does anyone have a rationalization for changing something so simple yet fundamental at the cost of half century of unix lineage and interchangeability?



I think, the forum is for asking that questions.

I think that would have been the theme of the thread. If the change would have used
/etc/motd as /etc/motd.template, perhaps very few would have
noted the change.

I never paid attention to motd, and I do not like what it was (changing files that one write).


----------



## tux2bsd (Aug 17, 2021)

rotor said:


> Jus' sayin'


Edit your post to remove that, it discredits what you said and I think you had good points and a good original question.
Again, I think the unnecessary change to motd was/is stupid.


----------



## tux2bsd (Aug 17, 2021)

hruodr said:


> I think that would have been the theme of the thread. If the change would have used
> /etc/motd as /etc/motd.template, perhaps very few would have
> noted the change.


Correct.  If my motd produces something I want to change I reflexively edit /etc/motd... and if that edit doesn't work I get pissed off finding out I have to relearn something that was ultra trivial.


----------



## xk2600 (Nov 30, 2022)

...necromancing this thread... 

So... just throwing some more tomatoes at the wall... Seems like it would have been great to at least give /etc/motd.template a wee bit more power... like maybe the ability to have it evaluate variables available to the user at login %h %t %s %v (hostname, time, shell, vty)...

In the end, editing /etc/motd.template versus /etc/motd is really not that big a deal..


----------



## Datapanic (Nov 30, 2022)

Geezer said:


> View attachment 10921
> Dead
> 
> View attachment 10922
> Still Alive


I took two courses at the University of Maryland where those books were required.  Still got em!


----------



## Datapanic (Nov 30, 2022)

How to make motd on FreeBSD-13 look just like FreeBSD-12...

First, in /etc/rc.conf add these lines:

```
#
# MOTD
#
motd_enable="YES"
update_motd="YES"
```

Then in your shell as root...


```
mv /etc/motd.template /etc/motd.template.orig
touch /etc/motd.template
```

reboot or whatever and login, you should then get a login notification that looks something like this:

```
Last login: Tue Nov 29 22:18:09 2022 from somehostname.whatever.com
FreeBSD 13.1-RELEASE-p3 GENERIC
user@server ~]#
```

Mileage may vary.  Not responsible for anything that doesn't work.


----------



## DonK (Nov 30, 2022)

Geezer said:


> View attachment 10921



Still alive for me. So is gnome-terminal, tin, lynx, vi, tip, ...

gnome apps such as evolution, epiphany, nautilus, ... are run from a command line


----------

