ha_on $client $LFS setstripe $stripeparams $dir &&
ha_on $client $LFS getstripe $dir &&
ha_on $client chmod a+xwr $dir &&
- ha_on $client "su $mpiuser sh -c \" $mpirun $mpirunoptions \
+ ha_on $client "su $mpiuser bash -c \" $mpirun $mpirunoptions \
-np $((${#ha_clients[@]} * mpi_threads_per_client / ha_nclientsset)) \
$machines $cmd \" " || rc=$?
ha_on ${ha_clients[0]} "$check_attrs && \
$check_attrs " && rccheck=1
[[ -n "$ha_postcmd" ]] && ha_info "$ha_postcmd" &&
ha_on $client "$ha_postcmd" >>"$log" 2>&1
- (( ((rc == 0)) && ((rccheck == 0)) && (( mustpass != 0 )) )) ||
- (( ((rc != 0)) && ((rccheck == 0)) && (( mustpass == 0 )) )) &&
- ha_on $client rm -rf "$dir";
+ if (( ((rc == 0)) && ((rccheck == 0)) && \
+ (( mustpass != 0 )) )) ||
+ (( ((rc != 0)) && ((rccheck == 0)) && \
+ (( mustpass == 0 )) )); then
+ local suf=$(date +%s)
+ $ha_cleanup && ha_on $client rm -rf "$dir" ||
+ ha_on $client mv "$dir" "${dir}.${suf}"
+ fi;
} >>"$log" 2>&1
ha_info $client: rc=$rc rccheck=$rccheck mustpass=$mustpass
n=$(cat $ha_lfsck_log | awk '/repaired/ {print $3}' |\
awk '{sum += $1} END { print sum }')
- [ $n -eq 0] ||
+ (( n == 0 )) ||
{ ha_info "Total repaired: $n";
ha_touch fail; return 1; }
return 0