4cc2dba7fe
- Add patch to make iscsiadm complain and exit when run as user instead of hang spinning for the database lock - Add patch to make iscsiadm start iscsid when needed (rh 436175 related) - Don't start iscsi service when network not yet up (in case of using NM) add NM dispatcher script to start iscsi service once network is up
16 lines
314 B
Bash
Executable File
16 lines
314 B
Bash
Executable File
#!/bin/sh
|
|
|
|
export LC_ALL=C
|
|
|
|
if [ "$2" = "down" ]; then
|
|
/sbin/ip route ls | grep -q ^default || {
|
|
[ -f /var/lock/subsys/iscsi ] && /etc/rc.d/init.d/iscsi stop
|
|
}
|
|
fi
|
|
|
|
if [ "$2" = "up" ]; then
|
|
/sbin/ip -o route show dev "$1" | grep -q '^default' && {
|
|
/sbin/chkconfig iscsi && /etc/rc.d/init.d/iscsi start
|
|
}
|
|
fi
|