#!/bin/sh day=$(date +%w) hour=$(date +%H) if [ $day -ne 6 ] && [ $day -ne 0 ]; then if [ $hour -ge 8 ] && [ $hour -lt 18 ]; then echo echo Warning! echo "You are logging in between 8 and 18 on a weekday." echo -n "Continue anyway (y/N)? " read r if [ "$r" != "y" ]; then exit fi fi fi scriptfile="tele2.dip" usage() { echo "usage: tele2 [opts] options: -a use alternate (33600 bps) connection -f *don't* run fetchpop daemon -i store ip adress at home page" >&2 exit 1 } while getopts ":afi" c do case "$c" in a) a_flag=1;; f) f_flag=1;; i) i_flag=1;; :|'?') usage;; esac done if [ -n "$a_flag" ]; then scriptfile="tele2_33600.dip" fi if /sbin/dip $HOME/$scriptfile; then # if [ -z "$f_flag" ]; then # sleep 3 # /usr/local/bin/fetchpop -d -r # fi if [ -n "$i_flag" ]; then echo "Storing ip address at home page..." putaddr fi # xterm -iconic -T "Xtrophy ICQ" -e xicq & fi .