trying to fix for an effect that is pointless; when we ran on sun workstations, they always
logged out to the terminal, and that's where this script would leave a nice message displayed
on the screen. these days people just never log out of X, which is fine, but it makes this
kind of hack meaningless.
+++ /dev/null
-#!/bin/bash
-
-# this program is run in the background to show a bye message on the console.
-
-source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
-
-export LIGHTWEIGHT_INIT=true # make sure we just get our variables.
-source $HOME/yeti/scripts/launch_feisty_meow.sh
-export host=$(hostname)
-
-# use this to always print the message.
-# export hostlist=$host
-
-# only print on a few...
-export hostlist='chandra ducky equanimity gulliver hamstergate \
- mycroft mrowrt numenor shaggy simmy slowboat velma wolfe \
-\
- dervish frylock lagomorph shakezula '
-#hmmm: this hostlist is highly dependent on my own favorite host names.
-# to commoditize this, we should instead use a config file for the list.
-
-# set our domain name based on what's found in the resolv.conf file, where
-# dns info is often found.
-DOMAIN_NAME=$(grep -i search </etc/resolv.conf | tail -1 | sed -n -e 's/domain.\(.*\)$/\1/p')
-if [ -z "$DOMAIN_NAME" ]; then
- # second try, searching out the search domain as a suitable replacement
- # for the actual domain being specified.
- DOMAIN_NAME=$(grep -i search </etc/resolv.conf | tail -1 | sed -n -e 's/search.\(.*\)$/\1/p')
-fi
-# oh well, we don't know what the heck the domain is.
-if [ -z "$DOMAIN_NAME" ]; then DOMAIN_NAME=unknown_domain; fi
-
-echo domain is $DOMAIN_NAME
-
-for i in $hostlist; do
- if [ "$host" = "$i" -o "$host" = "$i.$DOMAIN_NAME" ]; then
-# echo $(date_stringer)": $host matched." >>$HOME/host_matched_in_byejob.txt
- ( /bin/bash <<end
- sleep 7; bash $FEISTY_MEOW_SCRIPTS/users/byemessage.sh /dev/console
-end
- )&
-jobs
- fi
-done
-
+++ /dev/null
-#!/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.
-
-# figure out where they want to show the message, or pick a default.
-TARGET_CONSOLE=$1
-if [ -z "$TARGET_CONSOLE" ]; then
- TARGET_CONSOLE=/dev/console
-fi
-
-# FORTUNE_TO_SHOW is a massaged form of a fortune cookie output.
-export FORTUNE_TO_SHOW="$(mktemp "$TMP/zz_nechung.XXXXXX")"
-
-# see if we can send out a screen blank character.
-echo -e '\0xc' >$FORTUNE_TO_SHOW
-#####echo >>$FORTUNE_TO_SHOW # first blank line in the file.
-# add lots of blank lines.
-for ((i=0; i<100; i++)); do echo >>$FORTUNE_TO_SHOW; done
-# drop in a fortune cookie.
-$BINDIR/nechung >>$FORTUNE_TO_SHOW
-# a couple extra blank lines.
-for i in 1 2 3; do echo >>$FORTUNE_TO_SHOW; done
-# and a reprinting of a login menu, since that's actually where we're
-# intended to leave the machine at.
-if [ -f /etc/issue.net ]; then
- cat /etc/issue.net >>$FORTUNE_TO_SHOW
-elif [ -f /etc/issue ]; then
- cat /etc/issue >>$FORTUNE_TO_SHOW
-fi
-echo -ne "$(hostname) login: " >>$FORTUNE_TO_SHOW
-
-# clear the screen, if we can.
-clear_console
-
-# we have to do extra processing to send the file out to the console.
-tr '\n' '\a' <$FORTUNE_TO_SHOW | sed -r -e 's/\a/\r\n/g' >$TARGET_CONSOLE
-
-# clean up.
-/bin/rm $FORTUNE_TO_SHOW
-
#!/bin/bash
-bash $FEISTY_MEOW_SCRIPTS/users/byemessage.sh
-nohup bash $FEISTY_MEOW_SCRIPTS/users/byejob.sh >/dev/null 2>&1
+# just prints a message before terminal exit.
-if [ -f $TMP/trash.last_keep_awake_process ]; then
- kill -9 $(cat $TMP/trash.last_keep_awake_process)
- \rm $TMP/trash.last_keep_awake_process
-fi
+source $FEISTY_MEOW_SCRIPTS/core/functions.sh
+
+nechung
+
+# quick pause to reflect.
+sleep 2
\exit 0