Commit 32423ccc authored by Benoit Rat's avatar Benoit Rat

alpha-pts: MAC will be used as S/N

parent 78cb5297
......@@ -79,12 +79,18 @@ done
# Obtain mac address
#MAC=$(ifconfig | grep 'eth0' | tr -s ' ' | cut -d ' ' -f5 | sed s/://g)
MAC=$(ifconfig | grep 'eth0' | tr -s ' ' | cut -d ' ' -f5 | sed s/://g)
if [ "$MAC" != "02:34:56:78:9A:BC" ]; then
SN=$(printf "%03d" 0x$(echo "$MAC" | tail -c 4))
fi
if [ ${SN} -eq "0" ]; then
user_echoasking "num" "Type the serial number" "S/N"
SN=$ans;
fi
echo "Starting test with WRS SN=${SN}"
export logfname="${APTS_SWITCH_DIR}/logs/output-${SN}"
# Put timestamp in the log
......@@ -100,4 +106,9 @@ run "$num";
cat $logfname.log >> ${logfname}_history.log
echo "" >> ${logfname}_history.log
chmod +r ${APTS_SWITCH_DIR}/logs/*
echo ""
echo "Test for switch ${SN} has terminated"
echo ""
cat $logfname.log
exit 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment