From ArchWiki
Revision as of 22:52, 10 September 2011 by Karol (talk | contribs) (the script works for me, so I put it back, although it probably can be improved)
Jump to navigation Jump to search

motd (Message of the day). The contents of Template:Filename are displayed by Template:Codeline after a successful login but just before it executes the login shell.

It is a good place to display your Terms of Service to remind users of your local policies or anything you wish to tell them. A sample script:

#define the filename to use as output
# Collect useful information about your system
# $USER is automatically defined
HOSTNAME=`uname -n`
KERNEL=`uname -r`
CPU=`uname -p`
ARCH=`uname -m`
# The different colours as variables
clear > $motd # to clear the screen when showing up
echo -e "$R#=============================================================================#" >> $motd
echo -e "	$W Welcome $B $USER $W to $B $HOSTNAME                " >> $motd
echo -e "	$R ARCH   $W= $ARCH                                   " >> $motd
echo -e "	$R KERNEL $W= $KERNEL                                 " >> $motd
echo -e "	$R CPU    $W= $CPU                                    " >> $motd
echo -e "$R#=============================================================================#" >> $motd
echo -e "$X" >> $motd