Add support for config file

This commit is contained in:
Marko Korhonen 2024-05-09 12:19:31 +03:00
parent 368afcdfd9
commit b9e033da09
Signed by: FunctionalHacker
GPG key ID: A7F78BCB859CD890
4 changed files with 21 additions and 4 deletions

View file

@ -2,6 +2,7 @@
set -e
CONFIG_FILE="/etc/dropbear/config"
KEY_TYPES="ed25519 ecdsa rsa"
get_fingerprint() {
@ -83,6 +84,12 @@ build() {
add_dir "/var/log"
touch "${BUILDROOT}"/var/log/lastlog
if [ -s $CONFIG_FILE ]; then
echo "Using config file $CONFIG_FILE:"
cat $CONFIG_FILE
add_file $CONFIG_FILE
fi
add_runscript
}