~ubuntu-branches/ubuntu/raring/open-iscsi/raring

« back to all changes in this revision

Viewing changes to etc/initd/initd.debian

  • Committer: Package Import Robot
  • Author(s): Stéphane Graber
  • Date: 2012-07-10 13:53:52 UTC
  • mfrom: (1.1.5) (4.1.15 sid)
  • Revision ID: package-import@ubuntu.com-20120710135352-8pw2po02ka51y2g2
Tags: 2.0.873-3ubuntu1
* Merge from Debian. Remaining changes: (LP: #961114, LP: #677333)
  - Add upstart job iscsi-network-interface
  - Migrate from /var/run and /lib/init/rw to /run, from /var/lock to
    /run/lock.
* Turn open-iscsi-utils into a transitional package

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
        log_daemon_msg "Disconnecting iSCSI targets"
47
47
        sync
48
48
        $ADM -m node --logoutall=all
49
 
        log_end_msg 0
 
49
        RETVAL=$?
 
50
        log_end_msg $RETVAL
50
51
}
51
52
 
52
53
stop() {
53
54
        stoptargets
 
55
        if [ $RETVAL -ne 0 ]; then
 
56
                log_failure_msg "Could not stop all targets, try again later"
 
57
                return $RETVAL
 
58
        fi
 
59
 
54
60
        log_daemon_msg "Stopping iSCSI initiator service"
55
61
        start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON
56
62
        rm -f $PIDFILE
68
74
 
69
75
restart() {
70
76
        stop
 
77
        if [ $RETVAL -ne 0 ]; then
 
78
                log_failure_msg "Stopping iSCSI initiator service failed, not starting"
 
79
                return $RETVAL
 
80
        fi
71
81
        start
72
82
}
73
83
 
74
84
restarttargets() {
75
85
        stoptargets
 
86
        if [ $RETVAL -ne 0 ]; then
 
87
                log_failure_msg "Could not stop all targets, try again later"
 
88
                return $RETVAL
 
89
        fi
76
90
        starttargets
77
91
}
78
92