Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Aug 2003 13:35:54 -0400
From:      Chuck Swiger <cswiger@mac.com>
To:        freebsd-questions@FreeBSD.org
Subject:   Re: motd question
Message-ID:  <3F4A48FA.2060108@mac.com>
In-Reply-To: <20030825163744.GA61150@keyslapper.org>
References:  <20030825163744.GA61150@keyslapper.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Louis LeBlanc wrote:
> Probably not possible, but I was wondering (and have for some time,
> though I can't find any info on it either way) whether /etc/motd is
> strictly a text in/text out file, or if there is a way to get it to
> execute a command, the output of which is to be included in the text
> output?

/etc/motd is a text file, and is displayed due to the following section 
/etc/login.conf:

default:\
         :passwd_format=md5:\
         :copyright=/etc/COPYRIGHT:\
         :welcome=/etc/motd:\

FYI, most other flavors of Unix have a "cat /etc/motd" in the default shell init 
files.  Anyway, if you want to dynamicly generate motd, you could invoke your 
program via cron or simply put something in /etc/profile which will display 
whatever it is you want to see (if for all users), or in ~/.profile [ ~/.login, 
~/.zlogin, etc]....

-- 
-Chuck




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F4A48FA.2060108>