Sophie

Sophie

distrib > Fedora > 13 > x86_64 > media > updates > by-pkgid > 08728dc3b73ec71c1d53d84ccfd2c822 > files > 1

iscsi-initiator-utils-6.2.0.872-7.fc13.i686.rpm

#!/bin/sh

export LC_ALL=C

if [ "$2" = "down" ]; then
	if ! /sbin/ip route ls | grep -q ^default &&
	   [ -f /var/lock/subsys/iscsi ]; then
		/etc/rc.d/init.d/iscsi stop
	fi
fi

if [ "$2" = "up" ]; then
	if /sbin/ip -o route show dev "$1" | grep -q '^default' && 
	   /sbin/chkconfig iscsi; then
		/etc/rc.d/init.d/iscsi start
	fi
fi