xref: /freebsd/tools/regression/zfs/zpool/create/option-R.t (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1#!/bin/sh
2
3dir=`dirname $0`
4. ${dir}/../../misc.sh
5
6echo "1..9"
7
8disks_create 1
9names_create 2
10
11expect_fl is_mountpoint /${name0}
12expect_fl is_mountpoint /${name1}
13expect_ok ${ZPOOL} create -R /${name1} ${name0} ${disk0}
14exp=`(
15  echo "NAME      PROPERTY  VALUE      SOURCE"
16  echo "${name0}  altroot   /${name1}  local"
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}
28
29disks_destroy
30