Minor fixes.

This commit is contained in:
Slawomir Wojciech Wojtczak (vermaden) 2012-08-30 20:55:50 +02:00
parent 0dc9e6737a
commit 632e46e5af
1 changed files with 7 additions and 7 deletions

14
beadm
View File

@ -420,19 +420,19 @@ EOF
fi fi
# disable automatic mount on all inactive boot environments # disable automatic mount on all inactive boot environments
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 NAME
do do
zfs set canmount=noauto ${I} zfs set canmount=noauto ${NAME}
done done
# enable automatic mount for active boot environment and promote it # enable automatic mount for active boot environment and promote it
zfs list -H -o name,origin -t filesystem -r ${POOL}/ROOT/${2} \ zfs list -H -o name,origin -r ${POOL}/ROOT/${2} \
| while read I ORIGIN | while read NAME ORIGIN
do do
zfs set canmount=on ${I} zfs set canmount=on ${NAME}
if [ "${ORIGIN}" != "-" ] if [ "${ORIGIN}" != "-" ]
then then
zfs promote ${I} zfs promote ${NAME}
fi fi
done done
echo "Activated successfully" echo "Activated successfully"