bootstrap-vz/base/fs/partitions/mbr_swap.py
2013-10-27 18:11:53 +01:00

11 lines
296 B
Python

from common.tools import log_check_call
from mbr import MBRPartition
class MBRSwapPartition(MBRPartition):
def __init__(self, size, previous):
super(MBRSwapPartition, self).__init__(size, 'swap', previous)
def _before_format(self, e):
log_check_call(['/sbin/mkswap', self.device_path])