Révision 49 bin/get-disk-zpool
get-disk-zpool (revision 49) | ||
---|---|---|
1 | 1 |
#!/bin/bash |
2 | 2 |
# $Id$ |
3 | 3 |
|
4 |
BINZFS="/sbin/zfs" |
|
5 |
BINZPOOL="/sbin/zpool" |
|
6 |
|
|
4 | 7 |
function usage { |
5 | 8 |
|
6 | 9 |
echo "Syntax $0" |
... | ... | |
26 | 29 |
if [ "$property" == "name" ] |
27 | 30 |
then |
28 | 31 |
echo "$property:$valueProperty" |
29 |
echo "$(/sbin/zpool status $valueProperty|grep -i "state:"|sed -e "s/^ \+//g"|sed -e "s/: /:/")"
|
|
30 |
echo "$(/sbin/zpool status $valueProperty|grep -i "scan:"|sed -e "s/^ \+//g"|sed -e "s/: /:/")"
|
|
32 |
echo "$($BINZPOOL status $valueProperty|grep -i "state:"|sed -e "s/^ \+//g"|sed -e "s/: /:/")"
|
|
33 |
echo "$($BINZPOOL status $valueProperty|grep -i "scan:"|sed -e "s/^ \+//g"|sed -e "s/: /:/")"
|
|
31 | 34 |
poolname="$valueProperty" |
32 | 35 |
fi |
33 | 36 |
if [[ "$property" =~ "children[" ]] |
Formats disponibles : Unified diff