diff options
author | davidovski <david@davidovski.xyz> | 2022-05-31 22:30:34 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-05-31 22:30:34 +0100 |
commit | 449b7102812ff6845ea852017466b83d693a86cd (patch) | |
tree | 6211b8cd7332db8f34d92c668cf819c1a5c02967 | |
parent | 4bac1f97b9990e70d71639ed1678a4256cc26098 (diff) |
added bootstrap keys to a config option
-rw-r--r-- | default.conf | 4 | ||||
-rw-r--r-- | src/bootstrap.sh | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/default.conf b/default.conf index ccfefc5..ed5bfed 100644 --- a/default.conf +++ b/default.conf @@ -10,3 +10,7 @@ dir { } buildfiles_git https://xi.davidovski.xyz/git/buildfiles.git + +bootstrap_keys { + davidovski https://xi.davidovski.xyz/keychain/xi.pub +} diff --git a/src/bootstrap.sh b/src/bootstrap.sh index f5fba78..d82380d 100644 --- a/src/bootstrap.sh +++ b/src/bootstrap.sh @@ -1,7 +1,9 @@ #!/bin/sh -DEFAULT_KEYS="davidovski https://xi.davidovski.xyz/keychain/xi.pub" +DEFAULT_KEYS=$(parseconf -v bootstrap_keys) +# create necessary directories for a complete system +# create_directories () { mkdir -p ${SYSROOT} mkdir -p ${SYSROOT}/dev @@ -42,7 +44,9 @@ import_keys () { if [ -d ${KEYCHAIN_DIR} ] && [ "$(ls ${KEYCHAIN_DIR} | wc -w)" != "0" ]; then keyimport * else - keyimport $DEFAULT_KEYS + echo "$DEFAULT_KEYS" | while read -r keypair; do + keyimport ${keypair%%:*} ${keypair#*:} + done fi } |