Thanks a lot for your answer. And for iscsictl ? I have modified my
script, but I don't think if it will run as expected.

case $1 in
start)
    sleep 5
    ${command} add_send_target -a 192.168.12.2:3260
    ${command} add_send_target -a 192.168.12.3:3260

    while [ `iscsictl list_targets | grep 3260 | wc -l` -ne 2 ];
    do ${command} refresh_targets; sleep 1;
    done

    ${command} login -P `iscsictl list_targets | \
        awk '/192.168.12.2/ { print $1; }' | tr -d ":"`
    ${command} login -P `iscsictl list_targets | \
        awk '/192.168.12.3/ { print $1; }' | tr -d ":"`
    sleep 1
    mount -o rw,log NAME=bacula /opt/bacula
    mount -o rw,log NAME=video /opt/video
    /etc/rc.d/mountd reload
    ;;
...

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to