Révision 49 bin/zpool-get-state
zpool-get-state (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 :" |
... | ... | |
8 | 11 |
echo "$0 -h : display this message" |
9 | 12 |
} |
10 | 13 |
function nointeractive { |
11 |
echo $(/sbin/zpool status $poolname|grep -i "state:"|sed -e "s/^ \+//g"|sed -e "s/: /:/")
|
|
12 |
echo $(/sbin/zpool status $poolname|grep -i "scan:"|sed -e "s/^ \+//g"|sed -e "s/: /:/")
|
|
14 |
echo $($BINZPOOL status $poolname|grep -i "state:"|sed -e "s/^ \+//g"|sed -e "s/: /:/")
|
|
15 |
echo $($BINZPOOL status $poolname|grep -i "scan:"|sed -e "s/^ \+//g"|sed -e "s/: /:/")
|
|
13 | 16 |
exit 0 |
14 | 17 |
} |
15 | 18 |
while getopts "in:h" OPTION |
Formats disponibles : Unified diff