|
Lines 9-15
Link Here
|
| 9 |
# Required-Stop: $network |
9 |
# Required-Stop: $network |
| 10 |
# Should-Stop: multipathd |
10 |
# Should-Stop: multipathd |
| 11 |
# Default-Start: 3 5 |
11 |
# Default-Start: 3 5 |
| 12 |
# Default-Stop: |
12 |
# Default-Stop: |
| 13 |
# Short-Description: iSCSI initiator daemon |
13 |
# Short-Description: iSCSI initiator daemon |
| 14 |
# Description: The iSCSI initator is used to create and |
14 |
# Description: The iSCSI initator is used to create and |
| 15 |
# manage iSCSI connections to a iSCSI Target. |
15 |
# manage iSCSI connections to a iSCSI Target. |
|
Lines 231-237
iscsi_check_if_mounted()
Link Here
|
| 231 |
local dev=$1 |
231 |
local dev=$1 |
| 232 |
local d m t o x p |
232 |
local d m t o x p |
| 233 |
|
233 |
|
| 234 |
cat /proc/mounts | sed -ne '/^\/dev\/.*/p' | while read d m t o x; do |
234 |
cat /proc/mounts | sed -ne '/^\/dev\/.*/p' | while read d m t o x; do |
| 235 |
if [ -L "$d" ] ; then |
235 |
if [ -L "$d" ] ; then |
| 236 |
d=$(readlink -f $d) |
236 |
d=$(readlink -f $d) |
| 237 |
fi |
237 |
fi |
|
Lines 258-267
iscsi_check_if_mounted()
Link Here
|
| 258 |
|
258 |
|
| 259 |
# |
259 |
# |
| 260 |
# Unwind block device stack |
260 |
# Unwind block device stack |
| 261 |
# |
261 |
# |
| 262 |
# Stops unwinding if either no more 'holders' |
262 |
# Stops unwinding if either no more 'holders' |
| 263 |
# are found or if a device is mounted |
263 |
# are found or if a device is mounted |
| 264 |
# |
264 |
# |
| 265 |
# Unmounts top-level device and deconfigures |
265 |
# Unmounts top-level device and deconfigures |
| 266 |
# all devices down the stack |
266 |
# all devices down the stack |
| 267 |
# |
267 |
# |
|
Lines 388-393
iscsi_list_all_nodes()
Link Here
|
| 388 |
{ |
388 |
{ |
| 389 |
# Check for active sessions |
389 |
# Check for active sessions |
| 390 |
if $ISCSIADM -m session > /dev/null; then |
390 |
if $ISCSIADM -m session > /dev/null; then |
|
|
391 |
echo "No active connections." |
| 391 |
return 0 |
392 |
return 0 |
| 392 |
fi |
393 |
fi |
| 393 |
echo "Active connections:" |
394 |
echo "Active connections:" |
|
Lines 399-407
iscsi_list_all_nodes()
Link Here
|
| 399 |
|
400 |
|
| 400 |
case "$1" in |
401 |
case "$1" in |
| 401 |
start) |
402 |
start) |
| 402 |
echo -n "Loading iscsi modules: " |
403 |
echo -n "Loading iscsi modules: " |
| 403 |
iscsi_load_transport_modules |
404 |
iscsi_load_transport_modules |
| 404 |
rc_status -v |
405 |
rc_status -v |
| 405 |
if checkproc $DAEMON ; then |
406 |
if checkproc $DAEMON ; then |
| 406 |
RETVAL=0 |
407 |
RETVAL=0 |
| 407 |
else |
408 |
else |