17715 Update on attach not working when keys & certs are in play
authorDan Price <daniel.price@oracle.com>
Wed, 12 Jan 2011 20:19:27 -0800
changeset 2193 c22e53ceb4fc
parent 2192 906bafc90a02
child 2194 3c3fd102a79e
17715 Update on attach not working when keys & certs are in play
src/brand/attach
--- a/src/brand/attach	Wed Jan 12 18:24:19 2011 -0800
+++ b/src/brand/attach	Wed Jan 12 20:19:27 2011 -0800
@@ -596,18 +596,20 @@
 	fi
 
 	if [[ ${publisher.keyfile} != "None" ]]; then
-		newloc="$ZONEROOT/$KEYDIR/$(basename ${publisher.keyfile})"
+		relnewloc="$KEYDIR/$(basename ${publisher.keyfile})"
+		newloc="$ZONEROOT/$relnewloc"
 		safe_copy ${publisher.keyfile} $newloc
 		chmod 644 $newloc
 		chown -h root:root $newloc
-		args="$args -k $newloc"
+		args="$args -k $relnewloc"
 	fi
 	if [[ ${publisher.certfile} != "None" ]]; then
-		newloc="$ZONEROOT/$KEYDIR/$(basename ${publisher.certfile})"
+		relnewloc="$KEYDIR/$(basename ${publisher.certfile})"
+		newloc="$ZONEROOT/$relnewloc"
 		safe_copy ${publisher.certfile} $newloc
 		chmod 644 $newloc
 		chown -h root:root $newloc
-		args="$args -c $newloc"
+		args="$args -c $relnewloc"
 	fi
 	LC_ALL=C $PKG unset-publisher $key >/dev/null 2>&1
 	LC_ALL=C $PKG set-publisher $args $key