Revision 3ccb2618 image_creator/main.py

b/image_creator/main.py
34 34
from image_creator import get_os_class
35 35
from image_creator import __version__ as version
36 36
from image_creator.disk import Disk
37
from image_creator.util import get_command
38

  
37 39
import sys
38 40
import os
39 41
import optparse
40
from pbs import dd
42

  
43
dd = get_command('dd')
41 44

  
42 45

  
43 46
class FatalError(Exception):
......
123 126

  
124 127
        size = options.shrink and dev.shrink() or dev.size()
125 128
        metadata['size'] = str(size // 2 ** 20)
126

  
127 129
        dd('if=%s' % dev.device,
128 130
            'of=%s/%s.%s' % (options.outdir, options.name, 'diskdump'),
129 131
            'bs=4M', 'count=%d' % ((size + 1) // 2 ** 22))

Also available in: Unified diff