Rename args.no_fde to args.full_disk_encryption

This commit is contained in:
Oliver Smith 2017-06-28 17:22:48 +02:00
parent 86cb9f5ec8
commit 4573863561
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
2 changed files with 7 additions and 7 deletions

View File

@ -34,22 +34,22 @@ def format_and_mount_boot(args):
def format_and_mount_root(args):
mountpoint = "/dev/mapper/pm_crypt"
device = "/dev/installp2"
if not args.no_fde:
if args.full_disk_encryption:
logging.info("(native) format " + device + " (root, luks), mount to " +
mountpoint)
pmb.chroot.root(args, ["cryptsetup", "luksFormat", "--use-urandom",
"--cipher", args.cipher, "-q", device], log=False)
"--cipher", args.cipher, "-q", device], log=False)
pmb.chroot.root(args, ["cryptsetup", "luksOpen", device,
"pm_crypt"], log=False)
"pm_crypt"], log=False)
if not os.path.exists(args.work + "/chroot_native" + mountpoint):
raise RuntimeError("Failed to open cryptdevice!")
def format_and_mount_pm_crypt(args):
if args.no_fde:
device = "/dev/installp2"
else:
if args.full_disk_encryption:
device = "/dev/mapper/pm_crypt"
else:
device = "/dev/installp2"
mountpoint = "/mnt/install"
logging.info("(native) format " + device + " (ext4), mount to " +
mountpoint)

View File

@ -155,7 +155,7 @@ def arguments():
install.add_argument("--add", help="comma separated list of packages to be"
" added to the rootfs (e.g. 'vim,gcc')")
install.add_argument("--no-fde", help="do not use full disk encryption",
action="store_true")
action="store_false", dest="full_disk_encryption")
# Action: build / checksum / menuconfig / parse_apkbuild / aportgen
menuconfig = sub.add_parser("menuconfig", help="run menuconfig on"