2018-04-30 02:58:44 +00:00
|
|
|
#!/bin/ash
|
|
|
|
set -e -o pipefail
|
|
|
|
. /etc/functions
|
|
|
|
|
2023-02-20 16:01:17 +00:00
|
|
|
TRACE "Under /bin/key-init"
|
2023-02-18 17:58:43 +00:00
|
|
|
|
2018-04-30 02:58:44 +00:00
|
|
|
# Post processing of keys
|
2018-05-18 02:52:11 +00:00
|
|
|
|
|
|
|
# Import user's keys
|
2019-02-08 17:38:38 +00:00
|
|
|
gpg --import /.gnupg/keys/*.key /.gnupg/keys/*.asc 2>/dev/null || true
|
2018-04-30 02:58:44 +00:00
|
|
|
|
2018-05-18 02:52:11 +00:00
|
|
|
# Import trusted distro keys allowed for ISO signing
|
|
|
|
gpg --homedir=/etc/distro/ --import /etc/distro/keys/* 2>/dev/null || true
|
2019-02-08 17:38:38 +00:00
|
|
|
#Set distro keys trust level to ultimate (trust anything that was signed with these keys)
|
|
|
|
gpg --homedir=/etc/distro/ --list-keys --fingerprint --with-colons|sed -E -n -e 's/^fpr:::::::::([0-9A-F]+):$/\1:6:/p' |gpg --homedir=/etc/distro/ --import-ownertrust 2>/dev/null || true
|
|
|
|
gpg --homedir=/etc/distro/ --update-trust 2>/dev/null || true
|
|
|
|
|
2018-05-18 02:52:11 +00:00
|
|
|
# Add user's keys to the list of trusted keys for ISO signing
|
|
|
|
gpg --export | gpg --homedir=/etc/distro/ --import 2>/dev/null || true
|