From: Evan Broder <broder@mit.edu>
Date: Sat, 31 May 2008 20:51:39 +0000 (-0400)
Subject: Change sipb-xen-lvcopy so that it fails if you try to clone anything but ice3
X-Git-Tag: sipb-xen-guest-installer/1.4~4
X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-autoinstaller.git/commitdiff_plain/4b902b6ac877a0db060684f3a6fd97e33cbacf77

Change sipb-xen-lvcopy so that it fails if you try to clone anything but ice3

svn path=/trunk/packages/sipb-xen-guest-installer/; revision=542
---

diff --git a/debian/changelog b/debian/changelog
index 4dac5e6..6895cd8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+sipb-xen-guest-installer (1.3) unstable; urgency=low
+
+  * Change sipb-xen-lvcopy so that it fails if you try to clone
+    anything but ice3
+
+ -- Evan Broder <broder@mit.edu>  Sat, 31 May 2008 13:38:37 -0700
+
 sipb-xen-guest-installer (1.2) unstable; urgency=low
 
   * Work around bug in Python subprocess.
diff --git a/files/usr/sbin/sipb-xen-lvcopy b/files/usr/sbin/sipb-xen-lvcopy
index 317b88a..53c5aa8 100755
--- a/files/usr/sbin/sipb-xen-lvcopy
+++ b/files/usr/sbin/sipb-xen-lvcopy
@@ -48,6 +48,9 @@ def frob_copy(target, hostname, rootpw):
   call(['losetup', '-d', fs])
 
 def duplicate_by_vm(source, target, rootpw, nodd=False, nofrob=False):
+  if source != "ice3":
+     print "Error: can't clone that VM"
+     sys.exit(1)
   # source, target should be machine names
   prefix = 'd_'
   # 1. copy (by dd) source to target