Lines Matching defs:target_zone

212 char *target_zone;
402 if (target_zone != NULL)
403 (void) fprintf(stderr, "zone '%s': ", target_zone);
882 strcmp(ze->zone_name, target_zone) == 0) {
923 target_zone, path, ze->zone_name, rpath);
1118 if ((res = zone_get_state(target_zone, &state)) != Z_OK) {
1120 zperror2(target_zone, gettext("could not get state"));
1186 if ((err = zonecfg_get_handle(target_zone, handle)) != Z_OK) {
1226 if (sanity_check(target_zone, CMD_READY, B_FALSE, B_FALSE, B_FALSE)
1233 if (zonecfg_call_zoneadmd(target_zone, &zarg, locale, B_TRUE) != 0) {
1302 if (sanity_check(target_zone, CMD_BOOT, B_FALSE, B_FALSE, force)
1308 if (zonecfg_call_zoneadmd(target_zone, &zarg, locale, B_TRUE) != 0) {
1376 if (target_zone == NULL) {
1459 * id for target_zone, which in a non-global zone should
1463 assert(strcmp(zent.zname, target_zone) == 0);
1466 } else if ((zentp = lookup_running_zone(target_zone)) != NULL) {
1469 } else if (lookup_zone_info(target_zone, ZONE_ID_UNDEFINED,
1477 * only if we're in the global zone, and target_zone is specified
1480 if (zone_id == GLOBAL_ZONEID && target_zone != NULL &&
1481 strcmp(target_zone, GLOBAL_ZONENAME) != 0)
1850 if (sanity_check(target_zone, CMD_HALT, B_FALSE, B_FALSE, B_FALSE)
1861 return ((zonecfg_call_zoneadmd(target_zone, &zarg, locale,
1914 if (sanity_check(target_zone, CMD_SHUTDOWN, B_TRUE, B_FALSE, B_FALSE)
1918 if (zonecfg_call_zoneadmd(target_zone, &zarg, locale, B_TRUE) != Z_OK)
1922 if (sanity_check(target_zone, CMD_BOOT, B_FALSE, B_FALSE,
1927 if (zonecfg_call_zoneadmd(target_zone, &zarg, locale,
1978 if (sanity_check(target_zone, CMD_REBOOT, B_TRUE, B_FALSE, B_FALSE)
1985 return ((zonecfg_call_zoneadmd(target_zone, &zarg, locale, B_TRUE) == 0)
2039 target_zone, zonepath);
2713 target_zid = getzoneidbyname(target_zone);
2723 } else if (strcmp(dl_owner_zname, target_zone) == 0)
2798 if ((err = zonecfg_get_handle(target_zone, handle)) != Z_OK) {
2816 if ((err = zone_get_zonepath(target_zone, checkpath,
2819 zperror2(target_zone, gettext("could not get zone path"));
2849 execname, target_zone);
2873 if (sanity_check(target_zone, CMD_VERIFY, B_FALSE, B_FALSE, B_FALSE)
2932 if (target_zone == NULL) {
2942 if ((err = zone_get_zonepath(target_zone, zonepath,
2945 zperror2(target_zone, gettext("could not get zone path"));
2956 target_zone, zonepath) != Z_OK) {
2963 target_zone, zonepath) != Z_OK) {
3039 if (sanity_check(target_zone, CMD_INSTALL, B_FALSE, B_TRUE,
3045 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) {
3050 err = zone_set_state(target_zone, ZONE_STATE_INCOMPLETE);
3053 zperror2(target_zone, gettext("could not set state"));
3066 zonecfg_release_lock_file(target_zone, lockfd);
3077 if ((err = zone_set_state(target_zone, ZONE_STATE_INSTALLED)) != Z_OK) {
3079 zperror2(target_zone, gettext("could not set state"));
3091 (void) zone_set_state(target_zone,
3108 zperror2(target_zone,
3110 } else if ((temp_err = zone_set_state(target_zone,
3113 zperror2(target_zone, gettext("could not set state"));
3118 zonecfg_release_lock_file(target_zone, lockfd);
3124 zone_dochandle_t t_handle, char *target_zone)
3132 zperror2(target_zone, gettext("could not enumerate devices"));
3246 zone_dochandle_t t_handle, char *target_zone)
3254 zperror2(target_zone,
3290 zone_dochandle_t t_handle, char *target_zone)
3298 zperror2(target_zone,
3369 target_zone = source;
3386 valid_brand_clone(char *source_zone, char *target_zone)
3401 "types.\n"), execname, source_zone, target_zone);
3414 validate_clone(char *source_zone, char *target_zone)
3424 if ((err = zonecfg_get_handle(target_zone, t_handle)) != Z_OK) {
3443 err = valid_brand_clone(source_zone, target_zone);
3448 warn_fs_match(s_handle, source_zone, t_handle, target_zone);
3451 warn_ip_match(s_handle, source_zone, t_handle, target_zone);
3454 warn_dev_match(s_handle, source_zone, t_handle, target_zone);
3457 warn_dataset_match(s_handle, source_zone, t_handle, target_zone);
3603 if (sanity_check(target_zone, CMD_CLONE, B_FALSE, B_TRUE,
3667 if (validate_clone(source_zone, target_zone) != Z_OK)
3670 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) {
3684 if ((err = zone_get_zonepath(target_zone, zonepath, sizeof (zonepath)))
3687 zperror2(target_zone, gettext("could not get zone path"));
3700 if (get_hook(bh, cmdbuf, sizeof (cmdbuf), brand_get_clone, target_zone,
3709 target_zone, zonepath) != Z_OK) {
3736 brand_get_validatesnap, target_zone, zonepath) != Z_OK) {
3758 if ((err = zone_set_state(target_zone, ZONE_STATE_INCOMPLETE))
3761 zperror2(target_zone, gettext("could not set state"));
3831 err = zone_set_state(target_zone, ZONE_STATE_INSTALLED);
3834 zperror2(target_zone, gettext("could not set state"));
3838 zonecfg_release_lock_file(target_zone, lockfd);
4009 if (sanity_check(target_zone, CMD_MOVE, B_FALSE, B_TRUE, B_FALSE)
4023 if ((err = zone_get_zonepath(target_zone, zonepath, sizeof (zonepath)))
4026 zperror2(target_zone, gettext("could not get zone path"));
4089 if ((err = zonecfg_get_handle(target_zone, handle)) != Z_OK) {
4095 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) {
4191 zonecfg_release_lock_file(target_zone, lockfd);
4282 zonecfg_release_lock_file(target_zone, lockfd);
4334 if (sanity_check(target_zone, CMD_DETACH, B_FALSE, B_TRUE,
4344 if (target_zone == NULL) {
4349 if (strcmp(target_zone, GLOBAL_ZONENAME) == 0) {
4356 if ((err = zone_get_zonepath(target_zone, zonepath, sizeof (zonepath)))
4359 zperror2(target_zone, gettext("could not get zone path"));
4369 if (get_hook(bh, cmdbuf, sizeof (cmdbuf), brand_get_detach, target_zone,
4377 target_zone, zonepath) != Z_OK) {
4393 if (execute && zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) {
4407 zonecfg_release_lock_file(target_zone, lockfd);
4426 zonecfg_release_lock_file(target_zone, lockfd);
4463 if ((err = zonecfg_get_handle(target_zone, handle)) != Z_OK) {
4483 if (execute && (err = zone_set_state(target_zone,
4492 zonecfg_release_lock_file(target_zone, lockfd);
4715 if (sanity_check(target_zone, CMD_ATTACH, B_FALSE,
4722 if ((err = zone_get_zonepath(target_zone, zonepath,
4725 zperror2(target_zone,
4735 target_zone = "-";
4751 if (get_hook(bh, cmdbuf, sizeof (cmdbuf), brand_get_attach, target_zone,
4759 target_zone, zonepath) != Z_OK) {
4776 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) {
4797 zonecfg_release_lock_file(target_zone,
4827 zonecfg_release_lock_file(target_zone, lockfd);
4834 } else if ((err = zonecfg_get_handle(target_zone, handle)) != Z_OK) {
4844 (err = zone_set_state(target_zone, ZONE_STATE_INSTALLED)) != Z_OK) {
4850 zonecfg_release_lock_file(target_zone, lockfd);
4858 if ((err = zone_set_state(target_zone,
4938 if (sanity_check(target_zone, CMD_UNINSTALL, B_FALSE, B_TRUE,
4951 cmd_to_str(CMD_UNINSTALL), target_zone);
4963 if ((err = zone_get_zonepath(target_zone, zonepath,
4966 zperror2(target_zone, gettext("could not get zone path"));
4980 target_zone, zonepath) != Z_OK) {
4988 target_zone, zonepath) != Z_OK) {
5005 if ((err = zone_get_rootpath(target_zone, rootpath,
5008 zperror2(target_zone, gettext("could not get root "
5018 if (zonecfg_ping_zoneadmd(target_zone) == Z_OK) {
5022 (void) zonecfg_call_zoneadmd(target_zone, &zarg, locale,
5026 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) {
5038 zonecfg_release_lock_file(target_zone, lockfd);
5048 zonecfg_release_lock_file(target_zone, lockfd);
5054 err = zone_set_state(target_zone, ZONE_STATE_INCOMPLETE);
5057 zperror2(target_zone, gettext("could not set state"));
5074 zonecfg_release_lock_file(target_zone, lockfd);
5088 zperror2(target_zone, gettext("cleaning up zonepath "
5094 err = zone_set_state(target_zone, ZONE_STATE_CONFIGURED);
5097 zperror2(target_zone, gettext("could not reset state"));
5100 zonecfg_release_lock_file(target_zone, lockfd);
5129 if (sanity_check(target_zone, CMD_MOUNT, B_FALSE, B_FALSE, force)
5137 if (zonecfg_call_zoneadmd(target_zone, &zarg, locale, B_TRUE) != 0) {
5152 if (sanity_check(target_zone, CMD_UNMOUNT, B_FALSE, B_FALSE, B_FALSE)
5157 if (zonecfg_call_zoneadmd(target_zone, &zarg, locale, B_TRUE) != 0) {
5199 if (sanity_check(target_zone, CMD_MARK, B_FALSE, B_TRUE, B_FALSE)
5209 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) {
5215 err = zone_set_state(target_zone, state);
5218 zperror2(target_zone, gettext("could not set state"));
5220 zonecfg_release_lock_file(target_zone, lockfd);
5384 target_zone == NULL || strcmp(target_zone, GLOBAL_ZONENAME) != 0)
5410 if ((err = zonecfg_get_handle(target_zone, handle)) != Z_OK) {
5418 if ((err = zonecfg_apply_rctls(target_zone, handle)) != Z_OK) {
5514 if (sanity_check(target_zone, CMD_SYSBOOT, B_FALSE, B_TRUE, B_FALSE) !=
5525 if ((err = zonecfg_get_handle(target_zone, zone_handle)) != Z_OK) {
5545 target_zone, zonepath);
5688 target_zone = NULL;
5711 target_zone = optarg;
5743 target_zone = newtarget;
5746 if (target_zone != NULL && zone_get_id(target_zone, &zid) != 0) {
5748 zperror(target_zone, B_TRUE);
5757 zonecfg_init_lock_file(target_zone, &zone_lock_env);
5770 if ((target_zone != NULL) &&
5771 (strcmp(target_zone, GLOBAL_ZONENAME) != 0)) {
5772 if (zone_get_brand(target_zone, target_brand,