1#! /bin/sh
2
3#	$KAME: racoonquestion.sh,v 1.1 2001/01/27 05:46:22 itojun Exp $
4
5# sends question about racoon to sakane.
6# % racoonquestion logfile conffile
7#
8# caveat: the script will tell everything about your system, and every secret
9# keys, to sakane.
10
11if [ $# != 2 ]; then
12	echo usage: sendracoonquestion logfile conffile
13	exit 1
14fi
15if [ -e /tmp/racoonbug ]; then
16	echo fatal: clean /tmp/racoonbug first.
17	exit 1
18fi
19if [ `whoami` != root ]; then
20	echo fatal: must be a root to invoke this.
21	exit 1
22fi
23
24# do not let others read the result
25umask 0077
26mkdir /tmp/racoonbug || exit 1
27setkey -DP > /tmp/racoonbug/spd.$$
28setkey -D > /tmp/racoonbug/sad.$$
29ifconfig -a > /tmp/racoonbug/ifconfig.$$
30netstat -rn >/tmp/racoonbug/netstat.$$
31cp $1 /tmp/racoonbug/logfile.$$
32cp $2 /tmp/racoonbug/conffile.$$
33cd /tmp/racoonbug
34shar spd.$$ sad.$$ ifconfig.$$ netstat.$$ logfile.$$ conffile.$$ | mail sakane@kame.net
35cd /tmp
36/bin/rm -fr /tmp/racoonbug
37