No need to set mountpoint when activating, it was cloned

This commit is contained in:
Bryan Drewery 2012-05-05 00:39:33 -05:00
parent 0ae22830a8
commit affc1def11
1 changed files with 2 additions and 6 deletions

8
beadm
View File

@ -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