Commit ca44d90f authored by Dan Reading's avatar Dan Reading
Browse files

changing where files are uploaded, new diff file added

parent 3dd753a6
...@@ -61,29 +61,34 @@ set +e ...@@ -61,29 +61,34 @@ set +e
exit 1 exit 1
fi fi
# have needed dirs ? # have needed dirs ?
mkdir -p /proj/emulab-ops/nodecheck/Complete if [ ! -d /proj/emulab-ops/nodecheck/FullInventory ] ; then
mkdir -p /proj/emulab-ops/nodecheck/FullInventory
chmod 755 /proj/emulab-ops/nodecheck /proj/emulab-ops/nodecheck/FullInventory
fi
$(cp /tmp/nodecheck.log.tb.new /proj/emulab-ops/nodecheck/$host); $(cp /tmp/nodecheck.log.tb.new /proj/emulab-ops/nodecheck/$host);
$(cp /tmp/nodecheck.log.inv /proj/emulab-ops/nodecheck/Complete/$host); $(cp /tmp/nodecheck.log.inv /proj/emulab-ops/nodecheck/FullInventory/$host);
$(chmod a+r /proj/emulab-ops/nodecheck/$host /proj/emulab-ops/nodecheck/Complete/$host); $(chmod g+rw /proj/emulab-ops/nodecheck/$host /proj/emulab-ops/nodecheck/FullInventory/$host);
# Test what found local against what is in the database # Test what found local against what is in the database
readtmcinfo # info from tmcc.bin hwinv readtmcinfo # info from tmcc.bin hwinv
# for testing readtmcinfo /proj/emulab-ops/nodecheck/test
copytmcinfo # copy into hwinvcopy copytmcinfo # copy into hwinvcopy
readtmcinfo /proj/emulab-ops/nodecheck/$host # read local found into hwinv readtmcinfo /tmp/nodecheck.log.tb.new # read local found into hwinv
{ comparetmcinfo comparetmcinfo /tmp/nodecheck.diff # file for output
} > /tmp/$host.diff
cat /tmp/$host.diff if [ -s /tmp/nodecheck.diff ] ; then
if [ -s /tmp/$host.diff ] ; then cat /tmp/nodecheck.diff
$(cp /tmp/$host.diff /proj/emulab-ops/nodecheck) $(cp /tmp/nodecheck.diff /proj/emulab-ops/nodecheck/${host}.diff)
$(chmod a+r /proj/emulab-ops/nodecheck/$host.diff); $(chmod g+rw /proj/emulab-ops/nodecheck/${host}.diff);
else
# no diff maybe it got better
rm -f /proj/emulab-ops/nodecheck/${host}.diff
fi fi
# echo "NEED TO ENABLE rm -f /tmp/nodecheck.log.tb /tmp/nodecheck.log.inv" # echo "NEED TO ENABLE rm -f /tmp/nodecheck.log.tb /tmp/nodecheck.log.inv"
# echo "NEED TO ENABLE rm -f /tmp/nodecheck.log.tb.new /tmp/$host.diff" # echo "NEED TO ENABLE rm -f /tmp/nodecheck.log.tb.new /tmp/nodecheck.diff"
} }
gatherinv_main $0 gatherinv_main $0
......
Supports Markdown
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