Fix activating foreign BE. (rawthey)

This commit is contained in:
Slawomir Wojciech Wojtczak (vermaden) 2012-05-14 07:43:43 +02:00
parent 7872bbfc61
commit a19dc4b593
1 changed files with 6 additions and 3 deletions

9
beadm
View File

@ -260,11 +260,14 @@ EOF
zfs set canmount=noauto ${I} zfs set canmount=noauto ${I}
done done
# Enable mounting for the active BE and promote it # 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,origin -t filesystem -r ${POOL}/ROOT/${2} \
| while read I | while read I ORIGIN
do do
zfs set canmount=on ${I} 2> /dev/null zfs set canmount=on ${I} 2> /dev/null
zfs promote ${I} 2> /dev/null if [ ${ORIGIN} != "-" ]
then
zfs promote ${I}
fi
done done
echo "Activated successfully" echo "Activated successfully"
;; ;;