From owner-freebsd-questions Wed Sep 16 13:53:36 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA04278 for freebsd-questions-outgoing; Wed, 16 Sep 1998 13:53:36 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from silky.cs.indiana.edu (silky.cs.indiana.edu [129.79.253.71]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA04192 for ; Wed, 16 Sep 1998 13:53:07 -0700 (PDT) (envelope-from chiuk@cs.indiana.edu) Received: (from chiuk@localhost) by silky.cs.indiana.edu (8.8.7/8.8.7/IUCS_2.18) id PAA28459; Wed, 16 Sep 1998 15:52:17 -0500 (EST) Date: Wed, 16 Sep 1998 15:52:10 -0500 (EST) From: Kenneth Chiu X-Sender: ken@localhost To: Roman Katsnelson cc: "q's" Subject: Re: motd rotation In-Reply-To: <36002090.6BA9938C@graphnet.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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