diff options
author | Corey Hinshaw | 2017-03-12 20:05:47 -0400 |
---|---|---|
committer | Corey Hinshaw | 2017-03-12 20:05:47 -0400 |
commit | af89448291a72309a92217fce221417589aae146 (patch) | |
tree | 76fa8153eb0f5b7f244f1af1e9adcf6a0ed06e7b | |
parent | 13e93ce1baef3a12a6cea6451d68c15796d09c2e (diff) | |
download | aur-af89448291a72309a92217fce221417589aae146.tar.gz |
Clean up a few conditionals
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rwxr-xr-x | luks-tpm | 7 |
3 files changed, 6 insertions, 9 deletions
@@ -1,6 +1,6 @@ pkgbase = luks-tpm pkgdesc = Utility to manage LUKS keyfiles sealed by the TPM - pkgver = 0.1.0 + pkgver = 0.1.1 pkgrel = 1 url = https://github.com/electrickite/luks-tpm arch = any @@ -11,7 +11,7 @@ pkgbase = luks-tpm depends = coreutils depends = util-linux source = luks-tpm - sha256sums = 97c7b2a7f45674e96ec25bd69f48bda7749c59bbf6744608d561f84410634198 + sha256sums = 4d360ae7ec695ff3c8bf720971173c89a13625bbb34fa46e1ada85dee2bb1fb2 pkgname = luks-tpm @@ -1,7 +1,7 @@ # Maintainer: Corey Hinshaw <coreyhinshaw@gmail.com> pkgname=luks-tpm -pkgver=0.1.0 +pkgver=0.1.1 pkgrel=1 pkgdesc="Utility to manage LUKS keyfiles sealed by the TPM" arch=('any') @@ -10,7 +10,7 @@ license=('GPL') depends=('tpm-tools' 'trousers' 'cryptsetup' 'coreutils' 'util-linux') source=('luks-tpm') -sha256sums=('97c7b2a7f45674e96ec25bd69f48bda7749c59bbf6744608d561f84410634198') +sha256sums=('4d360ae7ec695ff3c8bf720971173c89a13625bbb34fa46e1ada85dee2bb1fb2') package() { install -Dm755 luks-tpm "${pkgdir}/usr/bin/luks-tpm" @@ -46,9 +46,7 @@ add_temp_key() { tpm_unsealdata -i "$SEALED_KEYFILE" -o "$KEYFILE" $WELL_KNOWN echo "Preparing to set a temporary LUKS passphrase..." - cryptsetup luksAddKey --key-slot $RESET_KEY_SLOT --key-file "$KEYFILE" $ROOT_DEVICE < /dev/tty - - if [ $? -eq 0 ]; then + if cryptsetup luksAddKey --key-slot $RESET_KEY_SLOT --key-file "$KEYFILE" $ROOT_DEVICE < /dev/tty; then echo "After booting into the current kernel, run" echo " luks-tpm $(echo $ORIGINAL_ARGS | sed 's/temp$/reset/')" echo "to generate a new TPM keyfile and remove this temporary key" @@ -96,8 +94,7 @@ reset_tpm_key() { create_tmpfs() { mkdir -p "$TMPFS_MOUNT" - mount tmpfs "$TMPFS_MOUNT" -t tmpfs -o size=1m - if [ $? -ne 0 ]; then + if ! mount tmpfs "$TMPFS_MOUNT" -t tmpfs -o size=1m; then echo "Could not create tmpfs. Aborting..." >&2 exit 3 fi |