folder modifications

git-svn-id: file:///srv/dev-disk-by-uuid-17e88007-4d0c-45e0-8757-cacfcc458630/repositories/svn/Diplomarbeit@108 9fe90eed-be63-e94b-8204-d34ff4c2ff93
This commit is contained in:
Matthias
2009-01-12 08:27:33 +00:00
parent 4381f5512f
commit f3c5d9a59c
10 changed files with 654 additions and 3 deletions
+49
View File
@@ -0,0 +1,49 @@
#!/bin/sh
# Hint: "ori" = ORIginal; "rb" = ReadBack; "res" = RESult; "err" = ERRor
# Make shure that result Directory exists
if [ ! -d /test/result ]
then
mkdir /test/result
fi
# Make shure that result file of Test does NOT exists
if [ -s /test/result/eth0.res ]
then
rm /test/result/eth0.res
fi
# Make shure that error file of Test does NOT exists
if [ -s /test/result/eth0.err ]
then
rm /test/result/eth0.err
fi
# Ping Server in local network to make shure Ethernet Device works
# "-c 4": Send only 4 packages
# "-I eth0": Use Ethernet 0 as device
ping -c 4 -I eth0 192.168.1.2 1>> /test/result/eth0.res 2>> /test/result/eth0.err
# Display content of /test/result/usb2.res
echo -e "\n\rContent of eth0res"
cat /test/result/eth0.res
# Display content of /test/result/usb2.err
echo -e "\n\rContent of eth0.err"
cat /test/result/eth0.err
# Variable "$?" contains the ping result. 0 represents a successful ping. If ethernet device not available, error file will
# not be empty
if [ $? -eq 0 -a ! -s /test/result/eth0.err ]
then
# Test was successful
echo -e "\n\rETHERNET 0 TEST-PASSED"
echo "ETHERNET 0 TEST-PASSED" >> /test/result/eth0.res
else
# Test failed
echo -e "\n\rETHERNET 0 TEST-FAIL"
echo "\n\rETHERNET 0 TEST-FAILED" >> /test/result/eth0.res
fi