From a19dc4b593b550ffd0c9d3e470342b56452c75c3 Mon Sep 17 00:00:00 2001 From: "Slawomir Wojciech Wojtczak (vermaden)" Date: Mon, 14 May 2012 07:43:43 +0200 Subject: [PATCH] Fix activating foreign BE. (rawthey) --- beadm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/beadm b/beadm index 1558c2e..a6c2c83 100755 --- a/beadm +++ b/beadm @@ -260,11 +260,14 @@ EOF zfs set canmount=noauto ${I} done # Enable mounting for the active BE and promote it - zfs list -H -o name -t filesystem -r ${POOL}/ROOT/${2} \ - | while read I + zfs list -H -o name,origin -t filesystem -r ${POOL}/ROOT/${2} \ + | while read I ORIGIN do zfs set canmount=on ${I} 2> /dev/null - zfs promote ${I} 2> /dev/null + if [ ${ORIGIN} != "-" ] + then + zfs promote ${I} + fi done echo "Activated successfully" ;;