From 4573863561721901dc26b951c633fd91b9b8abc8 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Wed, 28 Jun 2017 17:22:48 +0200 Subject: [PATCH] Rename args.no_fde to args.full_disk_encryption --- pmb/install/format.py | 12 ++++++------ pmb/parse/arguments.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pmb/install/format.py b/pmb/install/format.py index 202b1ff7..12a2e164 100644 --- a/pmb/install/format.py +++ b/pmb/install/format.py @@ -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) diff --git a/pmb/parse/arguments.py b/pmb/parse/arguments.py index a11bd359..1988a890 100644 --- a/pmb/parse/arguments.py +++ b/pmb/parse/arguments.py @@ -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"