From owner-freebsd-questions Thu Jan 9 18:32:23 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E6E8A37B405 for ; Thu, 9 Jan 2003 18:32:21 -0800 (PST) Received: from rwcrmhc53.attbi.com (rwcrmhc53.attbi.com [204.127.198.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A02743F43 for ; Thu, 9 Jan 2003 18:32:21 -0800 (PST) (envelope-from pdb2@u.washington.edu) Received: from u.washington.edu (12-231-115-57.client.attbi.com[12.231.115.57]) by rwcrmhc53.attbi.com (rwcrmhc53) with SMTP id <2003011002322005300bs42de>; Fri, 10 Jan 2003 02:32:20 +0000 Message-ID: <3E1E30B2.8050609@u.washington.edu> Date: Thu, 09 Jan 2003 18:32:18 -0800 From: paul beard Organization: University of Washington User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.1) Gecko/20021210 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Coreix Systems - UNIX Developers Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Motd Updating References: <001401c2b915$54172550$2d01a8c0@apollo> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Coreix Systems - UNIX Developers wrote: > > Can someone tell me he name of the .c or .h file containing code to do the > updating of MOTD, > i want to add company specific support data to the source so it can be > updated to motd on a daily basis, but do not want > it to be easily accessiably be sysadmins. > i have done it through a /etc/perodic/daily/script file, but clients can > find it i want to complile it in the source. > This is what I use. I run it from cron. #!/bin/sh cat /dev/null > /tmp/motd.tmp echo > /tmp/motd.tmp uname -a >> /tmp/motd.tmp echo >> /tmp/motd.tmp /usr/games/fortune >> /tmp/motd.tmp echo >> /tmp/motd.tmp df -k >> /tmp/motd.tmp echo >> /tmp/motd.tmp uptime >> /tmp/motd.tmp cp /tmp/motd.tmp /etc/motd -- Paul Beard 8040 27th Ave NE Seattle WA 98115 / 206 529 8400 Faith, n: That quality which enables us to believe what we know to be untrue. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message