Files
CISS.debian.live.builder/config/includes.chroot/usr/share/initramfs-tools/scripts/init-premount/dropbear
Marc S. Weidner 6c00891cd4
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m15s
🛡️ Retrieve DNSSEC status of coresecret.dev. / 🛡️ Retrieve DNSSEC status of coresecret.dev. (push) Successful in 54s
V8.13.404.2025.11.10
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
2025-11-10 11:57:27 +01:00

66 lines
1.7 KiB
Bash

#!/bin/sh
# bashsupport disable=BP5007
# shellcheck shell=sh
PREREQ="udev"
prereqs() {
echo "${PREREQ}"
}
# shellcheck disable=SC2249
case "$1" in
prereqs)
prereqs
exit 0
;;
esac
# shellcheck disable=SC2292
[ -x /sbin/dropbear ] || exit 0
run_dropbear() {
### CISS.debian.live.builder
### Remove old flags for dropbear version 2025.88-2.
### Only accepts flags from '/etc/dropbear/dropbear.conf'.
#local flags="Fs"
# shellcheck disable=SC2034,SC2154,SC2292
[ "${debug}" != y ] || flags="E${flags}" # log to standard error
# Always run configure_networking() before dropbear(8); on NFS
# mounts this has been done already
# shellcheck disable=SC2292
[ "${BOOT}" = nfs ] || configure_networking
log_begin_msg "Starting dropbear"
# Using exec and keeping dropbear in the foreground enables the
# init-bottom script to kill the remaining ipconfig processes if
# someone unlocks the rootfs from the console while the network is
# being configured
# shellcheck disable=SC2086
exec /sbin/dropbear ${DROPBEAR_OPTIONS-}
}
# shellcheck disable=SC2292
if [ -e /etc/dropbear/dropbear.conf ]; then
. /etc/dropbear/dropbear.conf
fi
. /scripts/functions
# On NFS mounts, wait until the network is configured. On local mounts,
# configure the network in the background (in run_dropbear()) so someone
# with console access can enter the passphrase immediately. (With the
# default ip=dhcp, configure_networking hangs for 5mins or so when the
# network is unavailable, for instance.)
# shellcheck disable=SC2292
[ "${BOOT}" != nfs ] || configure_networking
run_dropbear &
echo $! >/run/dropbear.pid
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh