summaryrefslogtreecommitdiff
path: root/usr/src/cmd/zoneadm/zoneadm.c
diff options
context:
space:
mode:
authorSteve Lawrence <Stephen.Lawrence@Sun.COM>2009-10-14 11:48:20 -0700
committerSteve Lawrence <Stephen.Lawrence@Sun.COM>2009-10-14 11:48:20 -0700
commit628680125482a37a45c692030029fd62a600f914 (patch)
tree907bf466b842dc95bfc68baf85b4503e766ebb1f /usr/src/cmd/zoneadm/zoneadm.c
parentbce0a86e5d4d65341c5aca6da2595c848297b2aa (diff)
downloadillumos-joyent-628680125482a37a45c692030029fd62a600f914.tar.gz
6874636 RFE: zoneadmd should mount cluster branded zones as native in alternate roots.
Diffstat (limited to 'usr/src/cmd/zoneadm/zoneadm.c')
-rw-r--r--usr/src/cmd/zoneadm/zoneadm.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/usr/src/cmd/zoneadm/zoneadm.c b/usr/src/cmd/zoneadm/zoneadm.c
index 4d80695b93..f67ea8f4a4 100644
--- a/usr/src/cmd/zoneadm/zoneadm.c
+++ b/usr/src/cmd/zoneadm/zoneadm.c
@@ -5662,6 +5662,20 @@ main(int argc, char **argv)
zerror(gettext("missing or invalid brand"));
exit(Z_ERR);
}
+ /*
+ * In the alternate root environment, the only supported
+ * operations are mount and unmount. In this case, just treat
+ * the zone as native if it is cluster. Cluster zones can be
+ * native for the purpose of LU or upgrade, and the cluster
+ * brand may not exist in the miniroot (such as in net install
+ * upgrade).
+ */
+ if (strcmp(target_brand, CLUSTER_BRAND_NAME) == 0) {
+ if (zonecfg_in_alt_root()) {
+ (void) strlcpy(target_brand, NATIVE_BRAND_NAME,
+ sizeof (target_brand));
+ }
+ }
}
err = parse_and_run(argc - optind, &argv[optind]);