diff options
| author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2015-11-12 13:49:49 +0000 |
|---|---|---|
| committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2015-11-12 13:49:49 +0000 |
| commit | 86dea8ce0c1e0dae474c80cee152a78d448e45ec (patch) | |
| tree | fa0e18695172d7aeabd17f8300c361459c68f64d /usr/src/cmd/zonecfg | |
| parent | df5a752772493b5a3e5efffb2cdef35c08225f41 (diff) | |
| download | illumos-joyent-86dea8ce0c1e0dae474c80cee152a78d448e45ec.tar.gz | |
OS-4942 would like sysevents when zones are created or destroyed
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Diffstat (limited to 'usr/src/cmd/zonecfg')
| -rw-r--r-- | usr/src/cmd/zonecfg/zonecfg.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usr/src/cmd/zonecfg/zonecfg.c b/usr/src/cmd/zonecfg/zonecfg.c index 235019ef46..714d04164d 100644 --- a/usr/src/cmd/zonecfg/zonecfg.c +++ b/usr/src/cmd/zonecfg/zonecfg.c @@ -23,7 +23,7 @@ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2014 Nexenta Systems, Inc. All rights reserved. * Copyright 2014 Gary Mills - * Copyright 2013, Joyent Inc. All rights reserved. + * Copyright 2015, Joyent Inc. */ /* @@ -558,6 +558,7 @@ static brand_handle_t brand; /* set in modifying functions, checked in read_input() */ static boolean_t need_to_commit = B_FALSE; +static boolean_t is_create = B_FALSE; boolean_t saw_error; /* set in yacc parser, checked in read_input() */ @@ -1812,6 +1813,7 @@ create_func(cmd_t *cmd) } need_to_commit = B_TRUE; + is_create = B_TRUE; zonecfg_fini_handle(handle); handle = tmphandle; got_handle = B_TRUE; @@ -6595,6 +6597,11 @@ verify_func(cmd_t *cmd) need_to_commit = B_FALSE; (void) strlcpy(revert_zone, zone, sizeof (revert_zone)); + + if (is_create) { + zonecfg_notify_create(handle); + is_create = B_FALSE; + } } /* |
