diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-02-17 15:36:56 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-03-04 13:17:06 +0000 |
commit | d2168a0fe0bc7f05caaeaf81681d0c3d17731e14 (patch) | |
tree | 6f8ea1e234ddc0b644aa35c72d79e88d0222e655 /morphlib/exts/kvm.write | |
parent | 976db9042d851de2c70e2719c32f611d68681209 (diff) | |
download | morph-d2168a0fe0bc7f05caaeaf81681d0c3d17731e14.tar.gz |
Make parse_autostart() into more general get_environment_boolean()
Also, be more flexible when parsing environment booleans -- convert to
lower case and match 0/1 and true/false as well as yes/no.
Diffstat (limited to 'morphlib/exts/kvm.write')
-rwxr-xr-x | morphlib/exts/kvm.write | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/morphlib/exts/kvm.write b/morphlib/exts/kvm.write index 4f877c22..94560972 100755 --- a/morphlib/exts/kvm.write +++ b/morphlib/exts/kvm.write @@ -1,5 +1,5 @@ #!/usr/bin/python -# Copyright (C) 2012-2013 Codethink Limited +# Copyright (C) 2012-2014 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -56,7 +56,7 @@ class KvmPlusSshWriteExtension(morphlib.writeexts.WriteExtension): temp_root, location = args ssh_host, vm_name, vm_path = self.parse_location(location) - autostart = self.parse_autostart() + autostart = self.get_environment_boolean('AUTOSTART') fd, raw_disk = tempfile.mkstemp() os.close(fd) |