Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
6efe8a15
Commit
6efe8a15
authored
Oct 04, 2013
by
Dan Reading
Browse files
checkinventorydrift: don't start with a none mfsmode file
parent
0f8e7d37
Changes
1
Hide whitespace changes
Inline
Side-by-side
clientside/tmcc/common/checknode/gen_sql
View file @
6efe8a15
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment