V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m53s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m53s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -39,7 +39,7 @@ write_crypttab() {
|
||||
# HMP_PATH_ENCLABEL
|
||||
# HMP_PATH_LUKSUUID
|
||||
# TARGET
|
||||
# user_dropbear_boot
|
||||
# dropbear_boot
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
@@ -77,7 +77,7 @@ EOF
|
||||
var_encryption_label="${HMP_PATH_ENCLABEL["${var_key}"]}"
|
||||
var_luks_uuid="${HMP_PATH_LUKSUUID["${var_key}"]}"
|
||||
|
||||
if [[ "${user_dropbear_boot,,}" == "true" ]]; then
|
||||
if [[ "${dropbear_boot,,}" == "true" ]]; then
|
||||
|
||||
write_crypttab "${var_encryption_label}" "UUID=${var_luks_uuid}" "none" "luks,discard,initramfs"
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ guard_sourcing
|
||||
# network_static_ipv4nameserver_1
|
||||
# user_bastion_enable
|
||||
# user_bastion_ipv4_0
|
||||
# user_dropbear_dhcp
|
||||
# user_dropbear_fw
|
||||
# dropbear_dhcp
|
||||
# dropbear_firewall
|
||||
# user_root_ssh_pubkeys_0
|
||||
# user_root_ssh_pubkeys_1
|
||||
# user_root_ssh_pubkeys_2
|
||||
@@ -63,7 +63,7 @@ setup_dropbear() {
|
||||
install -D -m 0755 -o root -g root "${VAR_SETUP_PATH}/includes/etc/banner" "${TARGET}/etc/dropbear/initramfs/"
|
||||
|
||||
### Check for initramfs "IP"-variable: static or dynamic configuration vai dhcp.
|
||||
if [[ "${user_dropbear_dhcp,,}" != "true" ]]; then
|
||||
if [[ "${dropbear_dhcp,,}" != "true" ]]; then
|
||||
declare network_static_ipv4ntpserver_0="192.53.103.108"
|
||||
### "IP=<HOST IP>::<GATEWAY IP>:<SUBNET MASK>:<FQDN>:<NIC>:none:<DNS 0 IP>:<DNS 1 IP>:<NTP IP>"
|
||||
printf "IP=%s::%s:%s:%s:%s:none:%s:%s:%s\n" \
|
||||
@@ -138,13 +138,13 @@ EOF
|
||||
install -D -m 0755 -o root -g root "${VAR_SETUP_PATH}/includes/initramfs-tools/files/dropbear_fw.sh" \
|
||||
"${TARGET}/includes/initramfs-tools/files/"
|
||||
|
||||
if [[ "${user_dropbear_fw,,}" == "true" && -n "${user_bastion_ipv4_0}" ]]; then
|
||||
if [[ "${dropbear_firewall,,}" == "true" && -n "${user_bastion_ipv4_0}" ]]; then
|
||||
|
||||
sed -i 's/^DROPBEAR_FIREWALL_ENABLED=0$/DROPBEAR_FIREWALL_ENABLED=1/' "${TARGET}/includes/initramfs-tools/files/dropbear_fw.cnf"
|
||||
sed -i '/^# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh$/d' "${TARGET}/includes/initramfs-tools/files/dropbear_fw.cnf"
|
||||
|
||||
cat << EOF >> "${TARGET}/includes/initramfs-tools/files/dropbear_fw.cnf"
|
||||
DROPBEAR_PORT=${user_ssh_port}
|
||||
DROPBEAR_PORT=${dropbear_port}
|
||||
DROPBEAR_JUMP_SERVER_IP=${user_bastion_ipv4_0}
|
||||
DROPBEAR_BASTION_ENABLE=${user_bastion_enable}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user