Skip to content

Commit

Permalink
Fix --delete with similar correct logic from --format
Browse files Browse the repository at this point in the history
  • Loading branch information
RainbowHackerHorse committed Jan 28, 2018
1 parent 71bf09c commit 2e94ad6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/shared/vzvol_getargz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ vzvol_getargz() {
shift
;;
--delete)
if zfs list -t volume | awk '{print $1}' | grep -v "NAME" | grep -vq "${2}"; then
( zfs list -t volume | awk '{print $1}' | grep -v "NAME" | grep -q "${2}" )
if [ $? = 1 ]; then
echo "Error, zvol ${2} does not exist."
echo "Try running vzvol --list or zfs list -t volume to see the available zvols on the system."
return 1
Expand Down

0 comments on commit 2e94ad6

Please sign in to comment.