Motd (Message-of-the-Day)

In this sample motd_files.cfg, we solve the problem of easily maintaining and installing customized message-of-the-day files across many systems.

Note how we #include process output from the Unix fortune command to add a dash of humor.  (The Unix fortune command outputs a random, hopefully interesting, and usually humorous adage or "fortune cookie.")

///////////////////////////////////////////////////////////////////////////////
//
// motd_files.cfg
//
///////////////////////////////////////////////////////////////////////////////

motd            path "/etc/motd" mode 644 uid 0 gid 0

///////////////////////////////////////////////////////////////////////////////
	
// add a funny bit

#indent

#include [/usr/bin/fortune]

#unindent

///////////////////////////////////////////////////////////////////////////////

// machine-specific messages follow

#if perf | mus | madrid

        Matlab 6.1 (r12) is installed and available for use.  To run this latest
        version, use the command "/opt/local/bin/matlab".  To run version 6.0,
        use the command "/opt/local/bin/matlab-6.0".  (Do something similar for
        versions 5.3 and 5.2.  Note:  We are likely to retire all Matlab versions
        earlier than 6.0 real soon now.)  You can access on-line Matlab
        documentation by clicking on the Help button in the graphical display.
        Please send all operational questions to dmitri.shostakovich@egbdf.
        Send UNIX-related technical questions to systems@egbdf.  Enjoy!
        
        SAS 8.2 is installed and available for use.  To run this latest version of
        SAS, use the command "/opt/local/bin/sas82".  If you run
        "/opt/local/bin/sas", you will instead run the older SAS 6.12.  After
        a time, we will make SAS 8.2 the new default.  For SAS 8.2 on-line docs,
        please visit the URL "http:\/\/berlin2.uppity.edu/sas/sashtml/main.htm".
        Please send all operational questions to dmitri.shostakovich@egbdf.
        Send UNIX-related technical questions to systems@egbdf.  Enjoy!

#endif  // perf | mus | madrid

///////////////////////////////////////////////////////////////////////////////

#if perf
        
        Some fans on paris6 have failed in recent days, causing the system to
        overheat and more than once shut down.  In order to cool the system
        and disk electronics, we have moved paris6 into the Machine Room.
        Unfortunately, this shorts the Lab one console, but at least paris6
        will still serve data and allow remote user logins.  If you have
        experienced problems on other perf systems in recent days, the paris6
        troubles are the most likely cause.

#endif  // perf

///////////////////////////////////////////////////////////////////////////////

#if crem
        
        We have posted and opened to access the latest CREM datasets.  To
        access them, run the command
        
        source /local/bin/cremrc.csh
        
        within your startup file (for example, .cshrc or .tcshrc).  The new CREM
	installation is located in /pub/crem.
        
        Please send all problem reports to the Research Computing Assistant,
        Dmitri Shostakovich (dmitri.shostakovich@egbdf).

#endif  // crem

///////////////////////////////////////////////////////////////////////////////

// a standard blurb
        
        To read this message in full, use the command:  more /etc/motd
        To suppress display of this message, use the command:  touch ~/.hushlogin

///////////////////////////////////////////////////////////////////////////////

On the piktmaster system, we would install a motd file customized for the crem systems with the command:

# piktc -iv +F motd +H crem

Open Hand For more examples, see Samples.

 
Home | FAQ | News | Intro | Samples | Tutorial | Reference | Software
Developer's Notes | Licensing | Authors | Pikt-Users | Pikt-Workers | Related Projects | Site Index | Privacy Policy | Contact Us
Page best viewed at 1024x768 or greater.   Page last updated 2008-03-27.   This site is PIKT® powered.
PIKT® is a registered trademark of the University of Chicago.   Copyright © 1998-2008 Robert Osterlund. All rights reserved.
Home FAQ News Intro Samples Tutorial Reference Software
PIKT Logo
PIKT Page Title
View sample
browser
cache clear
Pikt script