Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Sep 1998 15:52:10 -0500 (EST)
From:      Kenneth Chiu <chiuk@cs.indiana.edu>
To:        Roman Katsnelson <romank@graphnet.com>
Cc:        "q's" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: motd rotation
Message-ID:  <Pine.BSF.3.96.980916153737.372D-100000@localhost>
In-Reply-To: <36002090.6BA9938C@graphnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 16 Sep 1998, Roman Katsnelson wrote:

> > On Wed, 16 Sep 1998, I wrote:
> > > Hi,
> > >
> > > Is there any way to rotate different motd files?
> > > I mean, I could just have a bunch of different files, and have a cron
> > > rename a certain one motd every however-long, but is there anyway to
> > > automate this on startup?
> 
> 
> > Why not start up a script in rc.local that does this?
> 
> I'd thought of that, but then it's only executed on bootup. I'd like it
> to be rotated everytime someone logs on and off, whether it's on the
> console or telned or whatever.

You can come close by having the script rotate every N minutes.
Otherwise, you can consider editing the system startup files for
all shells allowed on your system.

You also might be able to use gettytab(5) or login.conf(5) to do
what you want, though I'm not positive this will work.

Normally gettytab will run login(1).  It looks like you can change
this to your own program.  After rotating the motd, you would need
to exec login.

Login.conf will allow you to run a shell other than that specified.
You can do something similar as with gettytab.  You need to exec
the shell in the SHELL environment variable after you are done.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980916153737.372D-100000>