Fix syncheck complaints

master
Daniel Molkentin 2018-05-22 13:55:00 +02:00 committed by Harald Hoyer
parent b31f3fe0d1
commit 6b7ffedf0d
1 changed files with 16 additions and 9 deletions

View File

@ -127,13 +127,16 @@ handle_netroot()
fi

#limit iscsistart login retries
if [[ ! "$iscsi_param" =~ "node.session.initial_login_retry_max" ]]; then
set_login_retries
retries=$?
if [ $retries -gt 0 ]; then
iscsi_param="${iscsi_param% } node.session.initial_login_retry_max=$retries"
fi
fi
case "$iscsi_param" in
*node.session.initial_login_retry_max*) ;;
*)
set_login_retries
retries=$?
if [ $retries -gt 0 ]; then
iscsi_param="${iscsi_param% } node.session.initial_login_retry_max=$retries"
fi
;;
esac

# XXX is this needed?
getarg ro && iscsirw=ro
@ -223,7 +226,8 @@ handle_netroot()
fi

for target in $iscsi_target_name; do
if [[ "$targets" =~ "$target" ]]; then
case "$targets" in
*$target*)
if [ -n "$iscsi_iface_name" ]; then
$(iscsiadm -m iface -I $iscsi_iface_name --op=new)
[ -n "$iscsi_initiator" ] && $(iscsiadm -m iface -I $iscsi_iface_name --op=update --name=iface.initiatorname --value=$iscsi_initiator)
@ -238,7 +242,10 @@ handle_netroot()
[ -n "$iscsi_in_username" ] && $($COMMAND --name=node.session.auth.username_in --value=$iscsi_in_username)
[ -n "$iscsi_in_password" ] && $($COMMAND --name=node.session.auth.password_in --value=$iscsi_in_password)
[ -n "$iscsi_param" ] && for param in $iscsi_param; do $($COMMAND --name=${param%=*} --value=${param#*=}); done
fi
;;
*)
;;
esac
done

iscsiadm -m node -L onboot || :