4830679275542191aae3ebd758199edbde218faaHuck Elliott# CDDL HEADER START
4830679275542191aae3ebd758199edbde218faaHuck Elliott# The contents of this file are subject to the terms of the
4830679275542191aae3ebd758199edbde218faaHuck Elliott# Common Development and Distribution License (the "License").
4830679275542191aae3ebd758199edbde218faaHuck Elliott# You may not use this file except in compliance with the License.
4830679275542191aae3ebd758199edbde218faaHuck Elliott# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4830679275542191aae3ebd758199edbde218faaHuck Elliott# See the License for the specific language governing permissions
4830679275542191aae3ebd758199edbde218faaHuck Elliott# and limitations under the License.
4830679275542191aae3ebd758199edbde218faaHuck Elliott# When distributing Covered Code, include this CDDL HEADER in each
4830679275542191aae3ebd758199edbde218faaHuck Elliott# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4830679275542191aae3ebd758199edbde218faaHuck Elliott# If applicable, add the following below this CDDL HEADER, with the
4830679275542191aae3ebd758199edbde218faaHuck Elliott# fields enclosed by brackets "[]" replaced with your own identifying
4830679275542191aae3ebd758199edbde218faaHuck Elliott# information: Portions Copyright [yyyy] [name of copyright owner]
4830679275542191aae3ebd758199edbde218faaHuck Elliott# CDDL HEADER END
4830679275542191aae3ebd758199edbde218faaHuck Elliott# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
4830679275542191aae3ebd758199edbde218faaHuck Elliott# Use is subject to license terms.
4830679275542191aae3ebd758199edbde218faaHuck Elliott# Copyright (c) 2012, 2016 by Delphix. All rights reserved.
4830679275542191aae3ebd758199edbde218faaHuck Elliott# DESCRIPTION:
4830679275542191aae3ebd758199edbde218faaHuck Elliott# The recursive flag -r can only be used for snapshots and not for
250518431587ddbe0a5c84a182f9218eeac383b3Huck Elliott# 1. Loop pool, fs, container and volume.
4830679275542191aae3ebd758199edbde218faaHuck Elliott# 2. Verify none of them can be rename by rename -r.
4830679275542191aae3ebd758199edbde218faaHuck Elliottlog_assert "The recursive flag -r can only be used for snapshots."
250518431587ddbe0a5c84a182f9218eeac383b3Huck Elliott typeset -i i=0
4830679275542191aae3ebd758199edbde218faaHuck Elliott # Check datasets, make sure none of them was renamed.
4830679275542191aae3ebd758199edbde218faaHuck Elliott typeset -i j=0
4830679275542191aae3ebd758199edbde218faaHuck Elliott if datasetexists ${datasets[$j]}-new ; then
4830679275542191aae3ebd758199edbde218faaHuck Elliott log_fail "${datasets[$j]}-new should not exists."
250518431587ddbe0a5c84a182f9218eeac383b3Huck Elliottlog_pass "The recursive flag -r can only be used for snapshots passed."