summaryrefslogtreecommitdiff
path: root/src/keygen.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/keygen.sh')
-rwxr-xr-xsrc/keygen.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/keygen.sh b/src/keygen.sh
index 1b6cc58..15527a6 100755
--- a/src/keygen.sh
+++ b/src/keygen.sh
@@ -1,7 +1,8 @@
1#!/bin/sh 1#!/bin/sh
2set -x
2gpg_set_ultimate_trust() 3gpg_set_ultimate_trust()
3{ 4{
4 local keygrip 5 local keygrip
5 keygrip=$(gpg2 -K --with-colons --with-fingerprint --with-fingerprint|sed -ne '/^sec/{n;p;q}'|cut -d: -f10) 6 keygrip=$(gpg2 -K --with-colons --with-fingerprint --with-fingerprint|sed -ne '/^sec/{n;p;q}'|cut -d: -f10)
6 printf '%s:6:\n' "$keygrip" | gpg2 --import-ownertrust 7 printf '%s:6:\n' "$keygrip" | gpg2 --import-ownertrust
7} 8}
@@ -24,6 +25,9 @@ init()
24 25
25 if [ "$root" ]; then 26 if [ "$root" ]; then
26 mkdir -m0600 -p "$root"/root/.gnupg 27 mkdir -m0600 -p "$root"/root/.gnupg
28 : kiki init root=$root
29 else
30 : kiki init root=/
27 fi 31 fi
28 32
29 kiki init --cipher=- ${root:+--chroot "$root"} 33 kiki init --cipher=- ${root:+--chroot "$root"}
@@ -118,6 +122,7 @@ else
118 parent_root= 122 parent_root=
119fi 123fi
120 124
125exec </dev/null
121silent 126silent
122init "$parent_root" 127init "$parent_root"
123new_child "$child_dir" "$parent_root" 128new_child "$child_dir" "$parent_root"