Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 09 Jan 2003 18:32:18 -0800
From:      paul beard <pdb2@u.washington.edu>
To:        Coreix Systems - UNIX Developers <craigrm@coreixsystems.com.au>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Motd Updating
Message-ID:  <3E1E30B2.8050609@u.washington.edu>
References:  <001401c2b915$54172550$2d01a8c0@apollo>

next in thread | previous in thread | raw e-mail | index | archive | help
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
<http://paulbeard.no-ip.org/movabletype/>;
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




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