]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - iscsi-initiator-utils/04-iscsi
help2man: Make package work on x86_64.
[people/amarx/ipfire-3.x.git] / iscsi-initiator-utils / 04-iscsi
CommitLineData
cdd964e9
MT
1#!/bin/sh
2
3export LC_ALL=C
4
5if [ "$2" = "down" ]; then
6 if ! /sbin/ip route ls | grep -q ^default &&
7 [ -f /var/lock/subsys/iscsi ]; then
8 /etc/rc.d/init.d/iscsi stop
9 fi
10fi
11
12if [ "$2" = "up" ]; then
13 if /sbin/ip -o route show dev "$1" | grep -q '^default' &&
14 /sbin/chkconfig iscsi; then
15 /etc/rc.d/init.d/iscsi start
16 fi
17fi