~ubuntu-branches/ubuntu/trusty/iscsitarget/trusty

« back to all changes in this revision

Viewing changes to debian/iscsitarget.init

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2008-05-17 11:33:55 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080517113355-gzmh2h3dleqe1qno
Tags: 0.4.15+svn148-2.1ubuntu1
* Merge from debian unstable, remaining changes:
  - Update kernel modules to build for several architectures.
  - Fixed init script.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
#
3
 
# chkconfig: - 39 35
4
 
# description: Starts and stops the iSCSI target
5
 
# debianized start-stop script
 
3
### BEGIN INIT INFO
 
4
# Provides:          cluster manager
 
5
# Required-Start:    $network $time
 
6
# Required-Stop:     $network $time
 
7
# Default-Start:     2 3 4 5
 
8
# Default-Stop:      0 1 6
 
9
# Short-Description: Starts and stops the iSCSI target
 
10
### END INIT INFO
6
11
 
7
12
PID_FILE=/var/run/iscsi_trgt.pid
8
13
CONFIG_FILE=/etc/ietd.conf
68
73
        # ugly, but ietadm does not allways provides correct exit values
69
74
        RETURN=`ietadm --op delete 2>&1`
70
75
        RETVAL=$?
71
 
        if [ $RETVAL = "0" ] && [ "${RETURN}" != "something wrong" ]; then
 
76
        if [ $RETVAL = "0" ] && [ "$RETURN" != "something wrong" ] ; then
72
77
            echo "succeeded."
73
78
        else
74
79
            echo "failed with reason :$RETURN"