Lines Matching refs:zonepath

143 #define	SHELP_MOVE	"move zonepath"
288 return (gettext("Move the zone to a new zonepath."));
292 "the zonepath are untouched).\n\tThe zone can subsequently "
908 "zonepath", path_copy);
919 * zonepath is a literal that should not be translated.
921 (void) fprintf(stderr, gettext("%s zonepath (%s) and "
922 "%s zonepath (%s) overlap.\n"),
976 * The zonepath is supposed to be mode 700 but its
978 * chmod() the zonepath itself to 700.
1991 const char *, const char *, char *, size_t), char *zonename, char *zonepath)
1996 if (bp(bh, zonename, zonepath, cmd + EXEC_LEN, len - EXEC_LEN) != 0)
2010 char zonepath[MAXPATHLEN];
2020 (void) strlcpy(zonepath, "-", sizeof (zonepath));
2021 } else if ((err = zonecfg_get_zonepath(handle, zonepath,
2022 sizeof (zonepath))) != Z_OK) {
2039 target_zone, zonepath);
2790 char zonepath[MAXPATHLEN], checkpath[MAXPATHLEN];
2804 if ((err = zonecfg_get_zonepath(handle, zonepath, sizeof (zonepath))) !=
2823 if (strcmp(zonepath, checkpath) != 0) {
2826 * XML and zonepath are literals that should not be translated.
2829 "zonepath '%s',\nbut the index file has zonepath '%s'.\n"
2831 zonepath, checkpath);
2836 validate_zonepath(zonepath, cmd_num) != Z_OK) {
2837 (void) fprintf(stderr, gettext("could not verify zonepath %s "
2838 "because of the above errors.\n"), zonepath);
2925 char zonepath[MAXPATHLEN];
2942 if ((err = zone_get_zonepath(target_zone, zonepath,
2943 sizeof (zonepath))) != Z_OK) {
2956 target_zone, zonepath) != Z_OK) {
2963 target_zone, zonepath) != Z_OK) {
3057 create_zfs_zonepath(zonepath);
3106 if ((temp_err = cleanup_zonepath(zonepath, B_FALSE)) != Z_OK) {
3109 gettext("cleaning up zonepath failed"));
3516 clone_copy(char *source_zonepath, char *zonepath)
3529 * Attempt to create a ZFS fs for the zonepath. As usual, we don't
3531 * of a simple directory for the zonepath.
3533 create_zfs_zonepath(zonepath);
3538 err = copy_zone(source_zonepath, zonepath);
3551 char zonepath[MAXPATHLEN];
3684 if ((err = zone_get_zonepath(target_zone, zonepath, sizeof (zonepath)))
3701 zonepath) != Z_OK) {
3709 target_zone, zonepath) != Z_OK) {
3736 brand_get_validatesnap, target_zone, zonepath) != Z_OK) {
3799 err = clone_snapshot_zfs(snapshot, zonepath,
3809 err = clone_zfs(source_zonepath, zonepath,
3813 err = clone_copy(source_zonepath, zonepath);
3843 * Used when removing a zonepath after uninstalling or cleaning up after
3844 * the move subcommand. This handles a zonepath that has non-standard
3848 * If the "all" parameter is true then we should remove the whole zonepath
3850 * we need to cleanup after moving the zonepath across file systems.
3856 cleanup_zonepath(char *zonepath, boolean_t all)
3875 * could blow away the whole system here if we got the wrong zonepath.
3877 if (*zonepath == NULL || strcmp(zonepath, "/") == 0) {
3878 (void) fprintf(stderr, "invalid zonepath '%s'\n", zonepath);
3886 if ((dirp = opendir(zonepath)) == NULL)
3890 * Look through the zonepath directory to see if there are any
3912 * zonepath so we don't want to remove the zonepath. We
3922 zonepath, std_entries[i]) >= sizeof (tmpbuf) ||
3937 zonepath);
3944 * There is nothing unexpected in the zonepath, try to get rid of the
3945 * whole zonepath directory.
3947 * If the zonepath is its own zfs file system, try to destroy the
3949 * then we'll just remove the contents of the zonepath.
3951 if (is_zonepath_zfs(zonepath)) {
3952 if (destroy_zfs(zonepath) == Z_OK)
3955 " %s/*", zonepath);
3962 zonepath);
3975 char zonepath[MAXPATHLEN];
4016 * Check out the new zonepath. This has the side effect of creating
4017 * a directory for the new zonepath. We depend on this later when we
4023 if ((err = zone_get_zonepath(target_zone, zonepath, sizeof (zonepath)))
4030 if (stat(zonepath, &zonepath_buf) == -1) {
4064 * Collect information about mounts within the zone's zonepath.
4068 if (zone_mounts_init(&mounts, zonepath) != 0)
4072 mounts.num_root_overlay_mounts, zonepath);
4103 * zonepath.
4105 if (zone_unmount_rootfs(&mounts, zonepath, B_FALSE) != 0)
4111 * new zonepath if the zonecfg update failed or it will clean up the
4112 * old zonepath if everything is ok.
4116 if (is_zonepath_zfs(zonepath) &&
4117 move_zfs(zonepath, new_zonepath) != Z_ERR) {
4130 (void) zone_mount_rootfs(&mounts, zonepath);
4134 if (rename(zonepath, new_zonepath) != 0) {
4141 (void) zone_mount_rootfs(&mounts, zonepath);
4147 * Attempt to create a ZFS fs for the new zonepath. As usual,
4149 * default behavior of a simple directory for the zonepath.
4154 "Moving across file systems; copying zonepath %s..."),
4155 zonepath);
4158 err = copy_zone(zonepath, new_zonepath);
4166 * Mount the zone's root filesystem in the new zonepath if there was
4177 zperror(gettext("could not set new zonepath"), B_TRUE);
4195 * clean up the new zonepath if the operation failed for some reason
4196 * or we clean up the old zonepath if everything is ok.
4201 * zonepath and its root file system moved but libzonecfg
4202 * couldn't save the new zonepath to the zone's configuration
4204 * zoneadm restores the zone's zonepath.
4210 * from the new zonepath. Bail!
4217 /* The zonecfg update failed, cleanup the new zonepath. */
4219 if (move_zfs(new_zonepath, zonepath) == Z_ERR) {
4221 "restore zonepath, the zfs mountpoint is "
4227 (void) zone_mount_rootfs(&mounts, zonepath);
4230 if (rename(new_zonepath, zonepath) != 0) {
4231 zperror(gettext("could not restore zonepath"),
4237 (void) zone_mount_rootfs(&mounts, zonepath);
4240 (void) printf(gettext("Cleaning up zonepath %s..."),
4249 "zonepath"), B_TRUE);
4259 (void) zone_mount_rootfs(&mounts, zonepath);
4262 /* The move was successful, cleanup the old zonepath. */
4265 gettext("Cleaning up zonepath %s..."), zonepath);
4267 err = cleanup_zonepath(zonepath, B_TRUE);
4272 zperror(gettext("could not remove zonepath"),
4296 char zonepath[MAXPATHLEN];
4356 if ((err = zone_get_zonepath(target_zone, zonepath, sizeof (zonepath)))
4370 zonepath) != Z_OK) {
4377 target_zone, zonepath) != Z_OK) {
4449 if (execute && zonecfg_find_mounts(zonepath, NULL, NULL)) {
4451 "mounted on subdirectories of %s.\n"), zonepath);
4452 (void) zonecfg_find_mounts(zonepath, zfm_print, NULL);
4636 char zonepath[MAXPATHLEN];
4722 if ((err = zone_get_zonepath(target_zone, zonepath,
4723 sizeof (zonepath))) != Z_OK) {
4736 (void) strlcpy(zonepath, "-", sizeof (zonepath));
4752 zonepath) != Z_OK) {
4759 target_zone, zonepath) != Z_OK) {
4821 /* Now we can validate that the zonepath exists. */
4822 if (validate_zonepath(zonepath, CMD_ATTACH) != Z_OK) {
4823 (void) fprintf(stderr, gettext("could not verify zonepath %s "
4824 "because of the above errors.\n"), zonepath);
4901 char rootpath[MAXPATHLEN], zonepath[MAXPATHLEN];
4963 if ((err = zone_get_zonepath(target_zone, zonepath,
4964 sizeof (zonepath))) != Z_OK) {
4980 target_zone, zonepath) != Z_OK) {
4988 target_zone, zonepath) != Z_OK) {
5086 if ((err = cleanup_zonepath(zonepath, B_FALSE)) != Z_OK) {
5088 zperror2(target_zone, gettext("cleaning up zonepath "
5506 char zonepath[MAXPATHLEN];
5531 if ((err = zonecfg_get_zonepath(zone_handle, zonepath,
5532 sizeof (zonepath))) != Z_OK) {
5545 target_zone, zonepath);