#!/bin/sh
#
# motd script to be called from uback
# $Revision: 1.1.1.1 $


if [ "x$1" = "x--help" ]; then
    echo "motd: changes the motd for the root user only."
    echo "      this requires that the root user has the"
    echo "      following command at the very end of his"
    echo "      .profile or .bashrc:"
    echo "      cat /usr/local/uback/state/motd"
    exit 1;
else
    . $1
fi

if [ "x$confdir" = "x" ]; then
    echo "Error: configfile \"$1\" missing or invalid!"
    exit 1;
else
    . $confdir/motd
fi


etc=$base/etc
log=$base/log
state=$base/state
motd=$state/motd

shift

echo $* > $motd

trap 'echo "abort."; exit 127' 1 2 3 15