Change sipb-xen-lvcopy so that it fails if you try to clone anything but ice3
authorEvan Broder <broder@mit.edu>
Sat, 31 May 2008 20:51:39 +0000 (16:51 -0400)
committerEvan Broder <broder@mit.edu>
Sat, 31 May 2008 20:51:39 +0000 (16:51 -0400)
svn path=/trunk/packages/sipb-xen-guest-installer/; revision=542

debian/changelog
files/usr/sbin/sipb-xen-lvcopy

index 4dac5e6..6895cd8 100644 (file)
@@ -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.
 sipb-xen-guest-installer (1.2) unstable; urgency=low
 
   * Work around bug in Python subprocess.
index 317b88a..53c5aa8 100755 (executable)
@@ -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):
   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
   # source, target should be machine names
   prefix = 'd_'
   # 1. copy (by dd) source to target