src/brand/poststate
changeset 2390 f1c659f5c28e
parent 2235 1f446820dcb0
--- a/src/brand/poststate	Fri Feb 11 14:04:06 2011 -0800
+++ b/src/brand/poststate	Wed Jun 01 13:04:31 2011 +0100
@@ -21,7 +21,7 @@
 #
 
 #
-# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
 . /usr/lib/brand/ipkg/common.ksh
@@ -48,20 +48,17 @@
 cmd=$4
 ALTROOT=$5
 
-typeset zone
-init_zone zone "$ZONENAME" "$ZONEPATH"
-eval $(bind_legacy_zone_globals zone)
-
 # If we're not halting the zone, then just return.
 if [ $cmd -eq 4 ]; then
-	is_brand_labeled	# Note: return value is C-style, not shell-style
+	is_brand_labeled
 	if (( $? == 0 )); then
-		# Leave the active boot environment mounted after halting (this
-		# might be a different dataset than what was mounted).
-		mount_active_be -c zone
+		# Leave the active dataset mounted after halting (this might be
+		# a different dataset than what was mounted).
+		mount_active_ds
 	else
 		# Umount dataset on the root.
-		unmount_be zone
+		zoneroot="$ZONEPATH/root"
+		umount $zoneroot || printf "$f_zfs_unmount" "$zoneroot"
 	fi
 fi