Skip to content

Commit

Permalink
check if guest exists before set
Browse files Browse the repository at this point in the history
  • Loading branch information
pr1ntf committed Jun 23, 2017
1 parent cb92a45 commit c730130
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/ioh-zfs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ __zfs_set() {
printf "\tset <name> <property=value> ...\n"
exit 1
fi
if ! __guest_exist $name; then
echo "Guest $name doesn't exist!"
return 1
fi
local pool="$(zfs list -H -t volume | cut -d '/' -f-3 | grep iohyve/$name | cut -d '/' -f 1 | head -n1)"
shift 2
for arg in "$@"; do
Expand Down

0 comments on commit c730130

Please sign in to comment.