diff options
-rwxr-xr-x | autocluster | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/autocluster b/autocluster index 2d8a8af..7e259d2 100755 --- a/autocluster +++ b/autocluster @@ -54,7 +54,9 @@ EOF commands: base [ create | boot ] ... - cluster [ build | destroy | create | update_hosts | boot | setup ] ... + cluster [ build | + destroy | undefine | + create | update_hosts | boot | setup ] ... create base create a base image @@ -536,6 +538,14 @@ cluster_destroy () vircmd destroy "$CLUSTER" || true } +cluster_undefine () +{ + announce "cluster undefine \"${CLUSTER}\"" + [ -n "$CLUSTER" ] || die "\$CLUSTER not set" + + vircmd undefine "$CLUSTER" || true +} + cluster_update_hosts () { announce "cluster update_hosts \"${CLUSTER}\"" @@ -1478,10 +1488,10 @@ case "$t" in actions_init for t in "$@" ; do case "$t" in - destroy|create|update_hosts|boot|setup) + destroy|undefine|create|update_hosts|boot|setup) actions_add "cluster_${t}" ;; build) - for t in destroy create update_hosts boot setup ; do + for t in destroy undefine create update_hosts boot setup ; do actions_add "cluster_${t}" done ;; |