Révision 49 bin/del-volume
del-volume (revision 49) | ||
---|---|---|
2 | 2 |
# $Id$ |
3 | 3 |
|
4 | 4 |
# TODO: fix typos |
5 |
|
|
6 | 5 |
GETINFO_ISCSI="/sbin/get-conf-iscsi-volume" |
7 | 6 |
DEL_ISCSI="/sbin/del-iscsi-volume" |
7 |
BINZFS="/sbin/zfs" |
|
8 |
BINZPOOL="/sbin/zpool" |
|
8 | 9 |
|
9 | 10 |
function usage { |
10 | 11 |
echo "Usage :" 1>&2 |
... | ... | |
21 | 22 |
|
22 | 23 |
if [ "$TID" == "" ] |
23 | 24 |
then |
24 |
zfs destroy -r $NAME_VOL
|
|
25 |
$BINZFS destroy -r $NAME_VOL
|
|
25 | 26 |
|
26 | 27 |
else |
27 | 28 |
$DEL_ISCSI -T $TID |
28 | 29 |
if [ $? -eq 0 ] |
29 | 30 |
then |
30 |
zfs destroy -r $NAME_VOL
|
|
31 |
$BINZFS destroy -r $NAME_VOL
|
|
31 | 32 |
else |
32 | 33 |
exit 1; |
33 | 34 |
fi |
... | ... | |
37 | 38 |
|
38 | 39 |
function interactive { |
39 | 40 |
|
40 |
zfs list
|
|
41 |
$BINZFS list
|
|
41 | 42 |
echo "*** Enter the ZFS Volume Name : ***" |
42 | 43 |
while read inputline |
43 | 44 |
do |
Formats disponibles : Unified diff