summarylogtreecommitdiffstats
path: root/mkinitcpio-sign-install
diff options
context:
space:
mode:
authorsharethewisdom2019-12-08 15:17:33 +0100
committersharethewisdom2019-12-08 15:17:33 +0100
commit34b42de36f4024d04276edab0b3d4bb1cef6b012 (patch)
tree63b6b3728f4552be359defee0b5844c46c0f7757 /mkinitcpio-sign-install
parentff88eb86eb43451af81b6bd41d0431fd6748e014 (diff)
downloadaur-mkinitcpio-sign-patch.tar.gz
attempt to fix the "agent already running" error from mkinitcpio-sign-install
Diffstat (limited to 'mkinitcpio-sign-install')
-rw-r--r--mkinitcpio-sign-install4
1 files changed, 2 insertions, 2 deletions
diff --git a/mkinitcpio-sign-install b/mkinitcpio-sign-install
index 4bacd2fe007..9d0942895aa 100644
--- a/mkinitcpio-sign-install
+++ b/mkinitcpio-sign-install
@@ -1,14 +1,14 @@
#!/bin/bash -e
pushd /usr/lib/initcpio/sign
-gpg-agent --daemon --max-cache-ttl 1
+gpg-connect-agent --homedir . reloadagent /bye
keys=(`gpg --homedir . --list-keys --with-colons | awk -F: '/^pub:/ { print $5 }' | tr '\n' ' '`)
if [[ $keys != "" ]]; then
echo "found $keys"
else
gpg --homedir . --gen-key
- [ $? -ne 0 ] && 1>&2 echo "you need to generate a GPG keypair to use for signing in /usr/lib/initcpio/sign" && exit 1
+ [ $? -ne 0 ] && 1>&2 echo "failed to generate a GPG keypair in /usr/lib/initcpio/sign" && exit 1
gpg --homedir . --export > ~/boot.key
fi