No need to set mountpoint when activating, it was cloned
This commit is contained in:
parent
0ae22830a8
commit
affc1def11
8
beadm
8
beadm
|
|
@ -237,21 +237,17 @@ EOF
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
# Disable mounting on all inactive datasets
|
||||||
zfs list -H -o name -r ${POOL}/ROOT \
|
zfs list -H -o name -r ${POOL}/ROOT \
|
||||||
| grep -v "${POOL}/ROOT/${2}" \
|
| grep -v "${POOL}/ROOT/${2}" \
|
||||||
| while read I
|
| while read I
|
||||||
do
|
do
|
||||||
zfs set canmount=noauto ${I}
|
zfs set canmount=noauto ${I}
|
||||||
done
|
done
|
||||||
|
# Enable mounting for the active BE and promote it
|
||||||
zfs list -H -o name -t filesystem -r ${POOL}/ROOT/${2} \
|
zfs list -H -o name -t filesystem -r ${POOL}/ROOT/${2} \
|
||||||
| while read I
|
| while read I
|
||||||
do
|
do
|
||||||
MOUNT=$( zfs get -H -o value mountpoint ${I} )
|
|
||||||
zfs set canmount=noauto ${I}
|
|
||||||
if [ "${MOUNT}" != legacy ]
|
|
||||||
then
|
|
||||||
zfs set mountpoint=${MOUNT} ${I}
|
|
||||||
fi
|
|
||||||
zfs set canmount=on ${I} 2> /dev/null
|
zfs set canmount=on ${I} 2> /dev/null
|
||||||
zfs promote ${I} 2> /dev/null
|
zfs promote ${I} 2> /dev/null
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue