All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 91d7fc89 authored by Dan Reading's avatar Dan Reading

Check the WCE bit should be inside the case statment not outside where it will be called 25 times.

parent 972eac7f
......@@ -94,7 +94,7 @@ main_diskcheck() {
declare -i -r rspeed_val=23
declare -i -r wcache=24
declare -i -r wcache_val=25
declare -i -r lastslot=25
declare -i -r lastslot=25 # used for iteration thru values
# init a default string
unset -v d; declare -a d=()
......@@ -165,8 +165,6 @@ main_diskcheck() {
# Must have size val before attempting disk speed tests
if (( $mfsmode == 1 )) ; then
for ((i=0;i<=$lastslot;i++)) ; do
# moved here getwcache so it will only run in mfsmode, and will run befor read/write test
d[$wcache_val]=$(getwcache ${drive[$idx]})
case $i in
$rspeed_val )
# check the size, if small then might be a USB drive
......@@ -177,7 +175,7 @@ main_diskcheck() {
$wspeed_val )
# XXX test to call getwcache a second time just before write-test - really for testing only
# check the WCE before the speed test
d[$wcache_val]=$(getwcache ${drive[$idx]})
if [ ${d[$size_val]} -gt 8 ] ; then
d[$wspeed_val]=$(getwspeed ${drive[$idx]})
......@@ -571,7 +569,7 @@ getwcache() {
elif [ "${x/0}" != "$x" ] ; then
printf " %s:%s " "Setting WCE" "$sd" >> ${logfile4tb}
printf " %s:%s\n" "Setting WCE" "$sd" >> ${logfile4tb}
/usr/local/etc/emulab/camwce -P on $sd > /dev/null 2>&1
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