diff options
author | Andrew Cady <d@jerkface.net> | 2020-05-06 20:26:45 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2020-05-06 20:26:45 -0400 |
commit | ff0fc50711e3d691fcc04bdfbb40be0bd7a0b9b4 (patch) | |
tree | 90303f96f9ad96ed137e6065787a9e3a1d9d36fd | |
parent | b75fe717045db33af3e9b0d9d74220daaf1c5a57 (diff) |
keygen.sh: verbose logging
-rwxr-xr-x | src/keygen.sh | 7 |
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 |
2 | set -x | ||
2 | gpg_set_ultimate_trust() | 3 | gpg_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= |
119 | fi | 123 | fi |
120 | 124 | ||
125 | exec </dev/null | ||
121 | silent | 126 | silent |
122 | init "$parent_root" | 127 | init "$parent_root" |
123 | new_child "$child_dir" "$parent_root" | 128 | new_child "$child_dir" "$parent_root" |