mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00

MAJOR refactor. The volume is now abstracted into a model along with a partitionmap and partitions. Volumes and partitions are now controlled via an FSM to ensure that commands are called in the proper sequence. GRUB can now be installed properly onto loop devices by using dmsetup to fake a proper harddisk.
11 lines
265 B
Python
11 lines
265 B
Python
from common.tools import log_check_call
|
|
from partition import Partition
|
|
|
|
|
|
class Swap(Partition):
|
|
|
|
def __init__(self, size, previous):
|
|
super(Swap, self).__init__(size, 'swap', previous)
|
|
|
|
def _format(self, e):
|
|
log_check_call(['/sbin/mkswap', self.device_path])
|