Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It just didn't have to happen, though.

Without debating the (IMO very questionable) utility of changing motd behavior, or the (IMO too sloppy) change management of Ubuntu...

A three-line update to man motd would have solved the problem, and the motd maintainer didn't do that, and whoever accepted the patch didn't do that, and now anyone who wants to figure what the Penguin is going on is going to have to google for it and, hopefully, find the answer before they hit the "download source" rabbit hole.

All because of a few sentences.

Yeah, at home I don't use Ubuntu directly anymore. =)



The manpage said:

> On Debian GNU/Linux this file is a symbolic link pointing to /var/run. The contents of this file are regenerated upon every system boot based on the contents of /etc/motd.tail.

The fundamental problem here is the blog author didn't realize that `echo foo > /etc/motd` wouldn't work, even though the manpage did, in fact, inform him that /etc/motd was just a symlink to something that gets regenerated at boot time. I'm not really sure what the manpage could have done to make it more obvious what his problem was.

Now, it's possible the manpage is out of date, and that it's regenerated via some other mechanism than /etc/motd.tail. I don't know (since I don't use Debian, or even Linux in general). But the salient point here was that it points to a file that gets regenerated at boot time.

*Edit: On second look, it sounds like this change makes it regenerate on each login, not just each boot. I can understand why someone might think that `echo foo > /etc/motd` followed by a login would then print 'foo', given the current manpage. But they certainly wouldn't expect that it would still print 'foo' after a reboot unless the break the symlink (and breaking the symlink fixes the author's complaint).


The manpage says: > On Debian GNU/Linux this file is a symbolic link pointing to /var/run. > The contents of this file are regenerated upon every system boot based > on the contents of /etc/motd.tail.

I do not know how one can go from this to "to get traditional behavior, delete the symlink and make /etc/motd a regular file." Great, so it's a symlink to a file that gets regenerated. Now how do I make it do the traditional thing? The manpage doesn't offer any help, and I couldn't figure it out if I didn't know the answer already.

Furthermore, having a configuration switch depend on whether a file is a symbolic link or not is just asinine.


I've been using Debian/Ubuntu since ~ 1999, and it took be about 20 seconds to figure this out. "ls /etc/motd. Oh, it's a symlink, ok, rm /etc/motd. Done."

In Debian, almost everything in /etc can be edited, and the system is designed to preserve the sysadmin's changes. Maybe this isn't obvious to new users, but if you've been using Debian for a while, this behaviour is exactly what you would expect.

Also, a quick visit to #debian or #ubuntu IRC would have resolved this in a few minutes.


Why are we blaming the 'victim' instead of enabling a solution?

A comment in the Description area that runs along these lines would have made the entire question a non-starter:

If /etc/motd is a non-symlinked file, regeneration will not occur.


Also, the original wording is not clear, IMHO.

"On Debian GNU/Linux this file is a symbolic link pointing to /var/run. The contents of this file are regenerated upon every system boot based on the contents of /etc/motd.tail."

It should probably read:

"On Debian GNU/Linux this file is usually a symbolic link pointing to /var/run. The contents of the file in /var/run are regenerated upon every system boot based on the contents of /etc/motd.tail."

To make it clear that the programs that generate the contents target the file in /var/run, and do not operate directly on /etc/motd.


Manpages for specific utilities really should not be reiterating basic unix knowledge (e.g. that piping data to a file via the shell > operator doesn't break symlinks).


How else are new users supposed to find out? Man pages are often poorly written and unhelpful. Indeed, calling the utility 'man' instead of 'help' is unhelpful.


You have got to be kidding! Man pages are amazing - often you can figure out what is going on or what niche switch you want to use much quicker with a man page than Google.


These assertions are not mutually exclusive.


I agree; I use Linux infrequently, and I've always found the man pages to be chock-full of details on how to use particular switches, but lacking in examples. I usually have to read them very closely just to get to the point of "look, I just want the basic usage on this tool so I can do X, the thing the tool is made for, rather than X -q -m -p."


I sure hope you would not write it that way, with a double negative. "Regeneration will occur if /etc/motd is a symlink to /var/run/motd"? Still not nice, but IMO easier to understand.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: