zoneadm.c (fbbfbc6ee66f60ad88ebd18c6c030797335354f4) zoneadm.c (628680125482a37a45c692030029fd62a600f914)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 5648 unchanged lines hidden (view full) ---

5657 */
5658 if ((target_zone != NULL) &&
5659 (strcmp(target_zone, GLOBAL_ZONENAME) != 0)) {
5660 if (zone_get_brand(target_zone, target_brand,
5661 sizeof (target_brand)) != Z_OK) {
5662 zerror(gettext("missing or invalid brand"));
5663 exit(Z_ERR);
5664 }
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 5648 unchanged lines hidden (view full) ---

5657 */
5658 if ((target_zone != NULL) &&
5659 (strcmp(target_zone, GLOBAL_ZONENAME) != 0)) {
5660 if (zone_get_brand(target_zone, target_brand,
5661 sizeof (target_brand)) != Z_OK) {
5662 zerror(gettext("missing or invalid brand"));
5663 exit(Z_ERR);
5664 }
5665 /*
5666 * In the alternate root environment, the only supported
5667 * operations are mount and unmount. In this case, just treat
5668 * the zone as native if it is cluster. Cluster zones can be
5669 * native for the purpose of LU or upgrade, and the cluster
5670 * brand may not exist in the miniroot (such as in net install
5671 * upgrade).
5672 */
5673 if (strcmp(target_brand, CLUSTER_BRAND_NAME) == 0) {
5674 if (zonecfg_in_alt_root()) {
5675 (void) strlcpy(target_brand, NATIVE_BRAND_NAME,
5676 sizeof (target_brand));
5677 }
5678 }
5665 }
5666
5667 err = parse_and_run(argc - optind, &argv[optind]);
5668
5669 return (err);
5670}
5679 }
5680
5681 err = parse_and_run(argc - optind, &argv[optind]);
5682
5683 return (err);
5684}