author | viric@llimona |
Tue, 30 May 2006 12:57:31 +0200 | |
changeset 58 | c03287b2c3c1 |
parent 33 | 5dd1b6c5015d |
permissions | -rwxr-xr-x |
17 | 1 |
#!/bin/bash |
2 |
||
3 |
TEST_NPIPE=prova_npipe |
|
4 |
TEST_UNIX=prova_unix |
|
5 |
TEST_UDP=4000 |
|
6 |
||
7 |
rm -f $TEST_NPIPE |
|
8 |
mkfifo $TEST_NPIPE |
|
9 |
rm -f $TEST_UNIX |
|
10 |
||
33
5dd1b6c5015d
Updated the 'test.sh', so it can _at least_ run with the actual syslog_kernel
viric@mandarina
parents:
17
diff
changeset
|
11 |
# backup the config file |
5dd1b6c5015d
Updated the 'test.sh', so it can _at least_ run with the actual syslog_kernel
viric@mandarina
parents:
17
diff
changeset
|
12 |
cp syslog.conf syslog.conf~ |
5dd1b6c5015d
Updated the 'test.sh', so it can _at least_ run with the actual syslog_kernel
viric@mandarina
parents:
17
diff
changeset
|
13 |
cat >syslog.conf << EOF |
5dd1b6c5015d
Updated the 'test.sh', so it can _at least_ run with the actual syslog_kernel
viric@mandarina
parents:
17
diff
changeset
|
14 |
from_unix=$TEST_UNIX |
5dd1b6c5015d
Updated the 'test.sh', so it can _at least_ run with the actual syslog_kernel
viric@mandarina
parents:
17
diff
changeset
|
15 |
from_udp=$TEST_UDP |
5dd1b6c5015d
Updated the 'test.sh', so it can _at least_ run with the actual syslog_kernel
viric@mandarina
parents:
17
diff
changeset
|
16 |
from_npipe=$TEST_NPIPE |
5dd1b6c5015d
Updated the 'test.sh', so it can _at least_ run with the actual syslog_kernel
viric@mandarina
parents:
17
diff
changeset
|
17 |
to_udp_host=disabled |
5dd1b6c5015d
Updated the 'test.sh', so it can _at least_ run with the actual syslog_kernel
viric@mandarina
parents:
17
diff
changeset
|
18 |
EOF |
5dd1b6c5015d
Updated the 'test.sh', so it can _at least_ run with the actual syslog_kernel
viric@mandarina
parents:
17
diff
changeset
|
19 |
|
17 | 20 |
./syslog_kernel & |
21 |
||
22 |
for a in 1 2 ; do |
|
33
5dd1b6c5015d
Updated the 'test.sh', so it can _at least_ run with the actual syslog_kernel
viric@mandarina
parents:
17
diff
changeset
|
23 |
echo provant IPv4... |
17 | 24 |
echo Enviant per udp IPv4 -$a- >/dev/udp/localhost/$TEST_UDP |
25 |
sleep 1 |
|
33
5dd1b6c5015d
Updated the 'test.sh', so it can _at least_ run with the actual syslog_kernel
viric@mandarina
parents:
17
diff
changeset
|
26 |
echo provant IPv6... |
17 | 27 |
echo Enviant per udp IPv6 -$a- >/dev/udp/::1/$TEST_UDP |
28 |
sleep 1 |
|
33
5dd1b6c5015d
Updated the 'test.sh', so it can _at least_ run with the actual syslog_kernel
viric@mandarina
parents:
17
diff
changeset
|
29 |
echo provant npipe... |
17 | 30 |
echo Enviant per named pipe -$a- > $TEST_NPIPE |
31 |
sleep 1 |
|
33
5dd1b6c5015d
Updated the 'test.sh', so it can _at least_ run with the actual syslog_kernel
viric@mandarina
parents:
17
diff
changeset
|
32 |
echo provant unix socket... |
17 | 33 |
echo Enviant per unix socket -$a- | ./unix_writer $TEST_UNIX |
34 |
sleep 1 |
|
35 |
done |
|
36 |
||
37 |
echo close >/dev/udp/localhost/$TEST_UDP |
|
38 |
sleep 1 |
|
39 |
echo close > $TEST_NPIPE |
|
40 |
sleep 1 |
|
41 |
echo close | ./unix_writer $TEST_UNIX |
|
42 |
||
43 |
wait |
|
44 |
||
45 |
rm -f $TEST_NPIPE |
|
46 |
rm -f $TEST_UNIX |
|
33
5dd1b6c5015d
Updated the 'test.sh', so it can _at least_ run with the actual syslog_kernel
viric@mandarina
parents:
17
diff
changeset
|
47 |
mv syslog.conf~ syslog.conf |
17 | 48 |