Skip to content

Commit

Permalink
Merge pull request #276 from pr1ntf/set-check-exist
Browse files Browse the repository at this point in the history
check if guest exists before set
  • Loading branch information
trent-pr1ntf authored Jun 23, 2017
2 parents 1fad2e2 + c730130 commit 4eb5781
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 4eb5781

Please sign in to comment.