iscsi-initiator-utils/04-iscsi
Hans de Goede 4cc2dba7fe - Rewrite SysV initscripts, fixes rh 441290, 246960, 282001, 436175, 430791
- 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
2008-10-13 18:12:29 +00:00

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