#!/bin/bash # generates new /etc/motd with header and footer if [ -e /etc/motd.header ]; then cat /etc/motd.header > /etc/motd fi tail -6 /usr/local/share/motd/messages | dotextwrap >> /etc/motd if [ -e /etc/motd.footer ]; then cat /etc/motd.footer >> /etc/motd fi exit 0