Miralinux Blog

  • Home
  • Linux
    • Scripts
    • CentOS
  • Apple
  • Microsoft
    • Features
    • Office
    • Windows
  • Learning
  • Games
  • Multimedia
    • XBMC
  • Other
    • About WordPress
  • Links
    • General
    • Software
      • Autocad
    • Hardware
      • BIOS
    • Linux
    • WiKieS

Posted on 2012/01/27 by arno Posted in Scripts

Create message of the day

mkmotd.sh

The contents of /etc/motd are displayed by login(1) after a successful login but just before it executes the login shell.

source: http://blog.miralinux.net/files/linux/local/bin/mkmotd.sh

[include]../../../files/linux/local/bin/mkmotd.sh[/include]

Creates an output like:

Linux hostname.domain.tld 2.6.0-120.3.2.el6.i686 #1 SMP Tue Mar 6 21:21:22 GMT 2012 i686 i686 i386 GNU/Linux
**************************************************************
* Welcome @ hostname.domain.tld
*-------------------------------------------------------------
* Intel(R) Xeon(R) CPU            3040  @ 1.86GHz
* 7984 Mb memory
*-------------------------------------------------------------
* /dev/sda 42°C [3.00TB] Western Digital #WD-W29345798346#
* /dev/sdb 43°C [3.00TB] Western Digital #WD-W34208573245#
* /dev/sdc 50°C [2.00TB] Hitachi Deskstar #JK134825798342#
* /dev/sdd 49°C [2.00TB] Hitachi Deskstar #JK348957345334#
* /dev/sde 00°C [64.0GB] JMicron based #039485739845#
* /dev/sdf 41°C [2.00TB] Western Digital #WD-WCAZ49573453#
* /dev/sdg 40°C [3.00TB] Western Digital #WD-WMA394759834#
*-------------------------------------------------------------
* inet (00:00:00:00:00:00) lo   127.0.0.1/8 scope host
* inet (00:ff:00:ff:00:81) eth0 192.168.41.10/24 brd 192.168.41.255
*-------------------------------------------------------------
* update(17:04 26-07-2012)                Copyright 1973/2012
**************************************************************

changelog:

201207, added harddisk temperatures, timestamp and changed layout ethernet addresses.

201206, added reading of hardwareinfo, harddrives, raid, network information automaticly.

201203, created a script that outputs text, hostname and year to the /etc/motd file.
« Script – Rescan Linux SCSI bus
Script – aliases »
  • Login
  • Mother of all Portals
  • .Handy .Handig
  • Links – wikis – wikies

Archives

  • June 2022
  • October 2021
  • June 2021
  • September 2016
  • April 2016
  • March 2016
  • November 2014
  • September 2014
  • August 2014
  • July 2014
  • April 2014
  • March 2014
  • November 2013
  • October 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • February 2013
  • December 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
CyberChimps ©2025