From 59139f41987ad571014f898e7750269aeaedf9c6 Mon Sep 17 00:00:00 2001
From: "Alan J. Pippin" <ajp@pippins.net>
Date: Sat, 8 Mar 2008 09:26:08 -0700
Subject: [PATCH] Added code to poweron the destpool and import it. Added code
 to export the destpool and power it down.

---
 zfs-replicate-wrapper | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/zfs-replicate-wrapper b/zfs-replicate-wrapper
index 4d7ff14..cd81593 100755
--- a/zfs-replicate-wrapper
+++ b/zfs-replicate-wrapper
@@ -41,18 +41,29 @@ done
 date=`date`;
 echo "$date ZFS admin lock obtained" >> $logfile
 
+# Poweron the destpool and import it
+/usr/local/bin/br -x /dev/ttyd0 A3 ON
+sleep 10
+zpool import $destpool
+
 # List the filesystems to replicate
 # The parent filesystems MUST be listed ahead
 # of the children filesystems.
 # Pool root filesystems must end with a slash.
 $replicate tank/ $destpool
+$replicate tank/var $destpool
 $replicate tank/usr $destpool
 $replicate tank/usr/home $destpool
 $replicate tank/usr/videos $destpool
 $replicate tank/usr/local $destpool
 $replicate tank/usr/local/etc $destpool
+$replicate tank/usr/local/var $destpool
 $replicate tank/backup $destpool
 
+# Export the destpool and power it down
+zpool export $destpool
+/usr/local/bin/br -x /dev/ttyd0 A3 OFF
+
 # Release our lock
 released_lock_date=1
 echo `date` ZFS admin lock released >> $logfile
-- 
2.34.1