home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.eterna.com.au
/
2014.06.ftp.eterna.com.au.tar
/
ftp.eterna.com.au
/
pub
/
rc.d.tar.gz
/
rc.d.tar
/
rc.d
/
motd
< prev
next >
Wrap
Text File
|
1998-09-23
|
486b
|
22 lines
#! /bin/sh
# PROVIDE: motd
# REQUIRE: mountall
# Update kernel info in /etc/motd
# Must be done *before* interactive logins are possible to prevent
# possible race conditions.
if checkyesno update_motd; then
echo 'updating motd.'
if [ ! -f /etc/motd ]; then
install -c -o root -g wheel -m 664 /dev/null /etc/motd
fi
T=/tmp/_motd
rm -f $T
sysctl -n kern.version | sed 1q > $T
echo "" >> $T
sed '1,/^$/d' < /etc/motd >> $T
cmp -s $T /etc/motd || cp $T /etc/motd
rm -f $T
fi