#!/bin/bash # byemessage prints out a nechung message as part of logging out. # the first parameter is the file or device to send the message to. # if it is blank, then standard output is used. TOSHOW=$TMP/.nechung.$RANDOM; export TOSHOW echo >$TOSHOW for i in 1 2 3 4 5; do echo >>$TOSHOW; done $BINDIR/nechung >>$TOSHOW for i in 1 2 3 4 5; do echo >>$TOSHOW; done # RANDO is a randomly chosen name in the temporary directory # that is used as the file name for a modified form of the # bye message. since the sun screen needs ^M on the end of # lines to get a carriage return, they must be inserted. export RANDO=$TMP/.trash$RANDOM echo >$RANDO sed -e 's/$//' $TOSHOW >>$RANDO /bin/rm $TOSHOW if [ $# -ge 1 ]; then cat $RANDO >$1 cat $YETI_DIR/database/upupaway.ansi >$1 TRASHNAME=$TMP/.exit.$RANDOM echo >$TRASHNAME cat /etc/issue >>$TRASHNAME echo "`hostname` login: " >>$TRASHNAME cat $YETI_DIR/database/uponce.ansi >>$TRASHNAME cat $TRASHNAME >$1 /bin/rm $TRASHNAME else cat $RANDO fi; /bin/rm $RANDO