Commit 6efe8a15 authored by Dan Reading's avatar Dan Reading

checkinventorydrift: don't start with a none mfsmode file

parent 0f8e7d37
......@@ -16,8 +16,16 @@ checkdrift_main() {
for host in $allnodes ; do
if [ -d $projdir/$host/.tbdb ] ; then
cd $projdir/$host/.tbdb
newest=$(ls -t | head -1)
allchecks=$(ls -t)
allchecks=$(ls | sort -r | paste -s -d \\\ -) # paste command used to convert into space seperated words.
# check that the first file is has a mfsmode=1
newest=${allchecks%%\ *}
allchecks=${allchecks#* } # pop the list
while (grep -c 'ismfs=0' $newest &> /dev/null) ; do
newest=${allchecks%% *}
allchecks=${allchecks#* } # pop the list
done
readtmcinfo $newest hwinvcopy
declare -i countsame=-1
for tocheck in $allchecks ; do
......@@ -29,9 +37,9 @@ checkdrift_main() {
echo ""
echo "$host $newest $tocheck are not the same"
echo "====================================================="
# reset compar file
echo "diff $tocheck $newest"
diff $tocheck $newest
# reset compare file
newest=$tocheck
readtmcinfo $newest hwinvcopy
# XXX - start
......
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