Lines Matching refs:zonepath

140 #define	SHELP_MOVE	"move zonepath"
279 return (gettext("Move the zone to a new zonepath."));
283 "the zonepath are untouched).\n\tThe zone can subsequently "
899 "zonepath", path_copy);
910 * zonepath is a literal that should not be translated.
912 (void) fprintf(stderr, gettext("%s zonepath (%s) and "
913 "%s zonepath (%s) overlap.\n"),
967 * The zonepath is supposed to be mode 700 but its
969 * chmod() the zonepath itself to 700.
1885 const char *, const char *, char *, size_t), char *zonename, char *zonepath)
1890 if (bp(bh, zonename, zonepath, cmd + EXEC_LEN, len - EXEC_LEN) != 0)
1904 char zonepath[MAXPATHLEN];
1914 (void) strlcpy(zonepath, "-", sizeof (zonepath));
1915 } else if ((err = zonecfg_get_zonepath(handle, zonepath,
1916 sizeof (zonepath))) != Z_OK) {
1933 target_zone, zonepath);
2684 char zonepath[MAXPATHLEN], checkpath[MAXPATHLEN];
2698 if ((err = zonecfg_get_zonepath(handle, zonepath, sizeof (zonepath))) !=
2717 if (strcmp(zonepath, checkpath) != 0) {
2720 * XML and zonepath are literals that should not be translated.
2723 "zonepath '%s',\nbut the index file has zonepath '%s'.\n"
2725 zonepath, checkpath);
2730 validate_zonepath(zonepath, cmd_num) != Z_OK) {
2731 (void) fprintf(stderr, gettext("could not verify zonepath %s "
2732 "because of the above errors.\n"), zonepath);
2819 char zonepath[MAXPATHLEN];
2836 if ((err = zone_get_zonepath(target_zone, zonepath,
2837 sizeof (zonepath))) != Z_OK) {
2850 target_zone, zonepath) != Z_OK) {
2857 target_zone, zonepath) != Z_OK) {
2951 create_zfs_zonepath(zonepath);
3000 if ((temp_err = cleanup_zonepath(zonepath, B_FALSE)) != Z_OK) {
3003 gettext("cleaning up zonepath failed"));
3409 clone_copy(char *source_zonepath, char *zonepath)
3422 * Attempt to create a ZFS fs for the zonepath. As usual, we don't
3424 * of a simple directory for the zonepath.
3426 create_zfs_zonepath(zonepath);
3431 err = copy_zone(source_zonepath, zonepath);
3444 char zonepath[MAXPATHLEN];
3577 if ((err = zone_get_zonepath(target_zone, zonepath, sizeof (zonepath)))
3594 zonepath) != Z_OK) {
3602 target_zone, zonepath) != Z_OK) {
3629 brand_get_validatesnap, target_zone, zonepath) != Z_OK) {
3692 err = clone_snapshot_zfs(snapshot, zonepath,
3702 err = clone_zfs(source_zonepath, zonepath,
3706 err = clone_copy(source_zonepath, zonepath);
3736 * Used when removing a zonepath after uninstalling or cleaning up after
3737 * the move subcommand. This handles a zonepath that has non-standard
3741 * If the "all" parameter is true then we should remove the whole zonepath
3743 * we need to cleanup after moving the zonepath across file systems.
3749 cleanup_zonepath(char *zonepath, boolean_t all)
3768 * could blow away the whole system here if we got the wrong zonepath.
3770 if (*zonepath == NULL || strcmp(zonepath, "/") == 0) {
3771 (void) fprintf(stderr, "invalid zonepath '%s'\n", zonepath);
3779 if ((dirp = opendir(zonepath)) == NULL)
3783 * Look through the zonepath directory to see if there are any
3805 * zonepath so we don't want to remove the zonepath. We
3815 zonepath, std_entries[i]) >= sizeof (tmpbuf) ||
3830 zonepath);
3837 * There is nothing unexpected in the zonepath, try to get rid of the
3838 * whole zonepath directory.
3840 * If the zonepath is its own zfs file system, try to destroy the
3842 * then we'll just remove the contents of the zonepath.
3844 if (is_zonepath_zfs(zonepath)) {
3845 if (destroy_zfs(zonepath) == Z_OK)
3848 " %s/*", zonepath);
3855 zonepath);
3868 char zonepath[MAXPATHLEN];
3909 * Check out the new zonepath. This has the side effect of creating
3910 * a directory for the new zonepath. We depend on this later when we
3916 if ((err = zone_get_zonepath(target_zone, zonepath, sizeof (zonepath)))
3923 if (stat(zonepath, &zonepath_buf) == -1) {
3957 * Collect information about mounts within the zone's zonepath.
3961 if (zone_mounts_init(&mounts, zonepath) != 0)
3965 mounts.num_root_overlay_mounts, zonepath);
3996 * zonepath.
3998 if (zone_unmount_rootfs(&mounts, zonepath, B_FALSE) != 0)
4004 * new zonepath if the zonecfg update failed or it will clean up the
4005 * old zonepath if everything is ok.
4009 if (is_zonepath_zfs(zonepath) &&
4010 move_zfs(zonepath, new_zonepath) != Z_ERR) {
4023 (void) zone_mount_rootfs(&mounts, zonepath);
4027 if (rename(zonepath, new_zonepath) != 0) {
4034 (void) zone_mount_rootfs(&mounts, zonepath);
4040 * Attempt to create a ZFS fs for the new zonepath. As usual,
4042 * default behavior of a simple directory for the zonepath.
4047 "Moving across file systems; copying zonepath %s..."),
4048 zonepath);
4051 err = copy_zone(zonepath, new_zonepath);
4059 * Mount the zone's root filesystem in the new zonepath if there was
4070 zperror(gettext("could not set new zonepath"), B_TRUE);
4088 * clean up the new zonepath if the operation failed for some reason
4089 * or we clean up the old zonepath if everything is ok.
4094 * zonepath and its root file system moved but libzonecfg
4095 * couldn't save the new zonepath to the zone's configuration
4097 * zoneadm restores the zone's zonepath.
4103 * from the new zonepath. Bail!
4110 /* The zonecfg update failed, cleanup the new zonepath. */
4112 if (move_zfs(new_zonepath, zonepath) == Z_ERR) {
4114 "restore zonepath, the zfs mountpoint is "
4120 (void) zone_mount_rootfs(&mounts, zonepath);
4123 if (rename(new_zonepath, zonepath) != 0) {
4124 zperror(gettext("could not restore zonepath"),
4130 (void) zone_mount_rootfs(&mounts, zonepath);
4133 (void) printf(gettext("Cleaning up zonepath %s..."),
4142 "zonepath"), B_TRUE);
4152 (void) zone_mount_rootfs(&mounts, zonepath);
4155 /* The move was successful, cleanup the old zonepath. */
4158 gettext("Cleaning up zonepath %s..."), zonepath);
4160 err = cleanup_zonepath(zonepath, B_TRUE);
4165 zperror(gettext("could not remove zonepath"),
4189 char zonepath[MAXPATHLEN];
4249 if ((err = zone_get_zonepath(target_zone, zonepath, sizeof (zonepath)))
4263 zonepath) != Z_OK) {
4270 target_zone, zonepath) != Z_OK) {
4342 if (execute && zonecfg_find_mounts(zonepath, NULL, NULL)) {
4344 "mounted on subdirectories of %s.\n"), zonepath);
4345 (void) zonecfg_find_mounts(zonepath, zfm_print, NULL);
4529 char zonepath[MAXPATHLEN];
4615 if ((err = zone_get_zonepath(target_zone, zonepath,
4616 sizeof (zonepath))) != Z_OK) {
4629 (void) strlcpy(zonepath, "-", sizeof (zonepath));
4645 zonepath) != Z_OK) {
4652 target_zone, zonepath) != Z_OK) {
4714 /* Now we can validate that the zonepath exists. */
4715 if (validate_zonepath(zonepath, CMD_ATTACH) != Z_OK) {
4716 (void) fprintf(stderr, gettext("could not verify zonepath %s "
4717 "because of the above errors.\n"), zonepath);
4794 char rootpath[MAXPATHLEN], zonepath[MAXPATHLEN];
4856 if ((err = zone_get_zonepath(target_zone, zonepath,
4857 sizeof (zonepath))) != Z_OK) {
4873 target_zone, zonepath) != Z_OK) {
4881 target_zone, zonepath) != Z_OK) {
4979 if ((err = cleanup_zonepath(zonepath, B_FALSE)) != Z_OK) {
4981 zperror2(target_zone, gettext("cleaning up zonepath "
5399 char zonepath[MAXPATHLEN];
5424 if ((err = zonecfg_get_zonepath(zone_handle, zonepath,
5425 sizeof (zonepath))) != Z_OK) {
5438 target_zone, zonepath);