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