#!/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11 file=/tmp/mail_ip-up$$ admin_email=argus@oopen.de from_address=ip-up_`hostname`@oopen.de from_name="ip-up - ckubu local net" host=`hostname -f` echo "" > $file echo " *************************************************************" >> $file echo " *** This is an autogenerated mail from $host ***" >> $file echo "" >> $file echo " I brought up the ppp-daemon with the following" >> $file echo -e " parameters:\n" >> $file echo -e "\tInterface name...............: $PPP_IFACE" >> $file echo -e "\tThe tty......................: $PPP_TTY" >> $file echo -e "\tThe link speed...............: $PPP_SPEED" >> $file echo -e "\tLocal IP number..............: $PPP_LOCAL" >> $file echo -e "\tPeer IP number..............: $PPP_REMOTE" >> $file if [ "$USEPEERDNS" ] && [ "$DNS1" ] ; then echo -e "\tNameserver 1.................: $DNS1" >> $file if [ "$DNS2" ] ; then echo -e "\tNameserver 2.................: $DNS2" >> $file fi fi echo -e "\tOptional \"ipparam\" value.....: $PPP_IPPARAM" >> $file echo "" >> $file echo -e "\tDate.........................: `date +\"%d.%m.%Y\"`" >> $file echo -e "\tTime.........................: `date +\"%H:%M:%S\"`" >> $file echo "" >> $file echo " **************************************************************" >> $file echo -e "To:${admin_email}\nSubject:$PPP_LOCAL\n`cat $file`" | /usr/sbin/sendmail -F "$from_name" -f $from_address $admin_email rm -f $file