xref: /freebsd/tools/regression/zfs/zpool/create/option-m.t (revision f4b37ed0f8b307b1f3f0f630ca725d68f1dff30d)
1#!/bin/sh
2# $FreeBSD$
3
4dir=`dirname $0`
5. ${dir}/../../misc.sh
6
7echo "1..28"
8
9disks_create 1
10names_create 2
11
12expect_fl is_mountpoint /${name0}
13expect_fl is_mountpoint /${name1}
14expect_ok ${ZPOOL} create -m /${name1} ${name0} ${disk0}
15exp=`(
16  echo "NAME      PROPERTY  VALUE  SOURCE"
17  echo "${name0}  altroot   -      default"
18)`
19expect "${exp}" ${ZPOOL} get altroot ${name0}
20expect_fl is_mountpoint /${name0}
21if [ -z "${no_mountpoint}" ]; then
22	expect_ok is_mountpoint /${name1}
23else
24	expect_fl is_mountpoint /${name1}
25fi
26expect_ok ${ZPOOL} destroy ${name0}
27expect_fl is_mountpoint /${name0}
28expect_fl is_mountpoint /${name1}
29expect_ok rmdir /${name1}
30
31expect_ok mkdir /${name1}
32expect_ok ${ZPOOL} create -m legacy ${name0} ${disk0}
33expect_fl is_mountpoint /${name0}
34expect_ok mount ${mount_t_flag} zfs ${name0} /${name1}
35if [ -z "${no_mountpoint}" ]; then
36	expect_ok is_mountpoint /${name1}
37else
38	expect_fl is_mountpoint /${name1}
39fi
40expect_ok umount /${name1}
41expect_fl is_mountpoint /${name1}
42expect_ok ${ZPOOL} destroy ${name0}
43expect_ok rmdir /${name1}
44
45expect_ok mkdir /${name1}
46expect_ok ${ZPOOL} create -m none ${name0} ${disk0}
47expect_fl is_mountpoint /${name0}
48expect_ok mount ${mount_t_flag} zfs ${name0} /${name1}
49if [ -z "${no_mountpoint}" ]; then
50	expect_ok is_mountpoint /${name1}
51else
52	expect_fl is_mountpoint /${name1}
53fi
54expect_ok umount /${name1}
55expect_fl is_mountpoint /${name1}
56expect_ok ${ZPOOL} destroy ${name0}
57expect_ok rmdir /${name1}
58
59disks_destroy
60