[Pkg-privacy-commits] [tails-installer] 15/31: Add a LiveUSBCreator.dd_image method
anonym
anonym-tails-guest at moszumanska.debian.org
Thu Jan 12 15:14:53 UTC 2017
This is an automated email from the git hooks/post-receive script.
anonym-tails-guest pushed a commit to annotated tag 3.13.0
in repository tails-installer.
commit 1137a6a489447e846c2140e48e3be7ac9a9ae9f6
Author: Luke Macken <lmacken at redhat.com>
Date: Tue Nov 25 19:07:58 2014 -0700
Add a LiveUSBCreator.dd_image method
---
liveusb/creator.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/liveusb/creator.py b/liveusb/creator.py
index 4a26dc5..962c701 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -438,6 +438,17 @@ class LiveUSBCreator(object):
def is_admin(self):
raise NotImplementedError
+ def dd_image(self):
+ self.log.info(_('Overwriting device with live image'))
+ parent = self.drive['parent']
+ if parent:
+ drive = parent
+ else:
+ drive = self.drive['device']
+ cmd = 'dd if="%s" of="%s" bs=1M' % (self.iso, drive)
+ self.log.info(_('Running') + ' %s' % cmd)
+ self.popen(cmd)
+
class LinuxLiveUSBCreator(LiveUSBCreator):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tails-installer.git
More information about the Pkg-privacy-commits
mailing list