V8.13.512.2025.11.27
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m26s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-11-27 23:44:42 +00:00
parent 7fc9692ce2
commit 26e22f47a5
21 changed files with 501 additions and 332 deletions

View File

@@ -44,8 +44,6 @@ fi
cp -f "${_BUSYBOX_BIN}" "${_TMP_DIR}/bin/busybox"
###
#######################################
# Copy required shared libs into the initramfs (if the busybox is dynamic).
# Globals:
@@ -76,7 +74,7 @@ copy_libs() {
copy_libs "${_BUSYBOX_BIN}"
### Generate /init script
### Generate '/init' script ----------------------------------------------------------------------------------------------------
cat << 'EOF' >| "${_TMP_DIR}/init"
#!/bin/busybox sh
# SPDX-Version: 3.0
@@ -184,7 +182,7 @@ EOF
chmod +x "${_TMP_DIR}/init"
### Create the initramfs archive.
### Create the initramfs archive -----------------------------------------------------------------------------------------------
( cd "${_TMP_DIR}" && find . -print0 | cpio --null -ov --format=newc ) | gzip -9 > /boot/ciss-memwipe/initrd.img
### Default configuration.
@@ -210,7 +208,7 @@ CISS_WIPE_TMPFS_PCT=95 # percentage of MemTotal to allocate
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=conf
EOF
### Helper script
### Helper script --------------------------------------------------------------------------------------------------------------
cat << 'EOF' >| /usr/local/sbin/ciss-memwipe
#!/bin/bash
# SPDX-Version: 3.0
@@ -273,7 +271,7 @@ esac
EOF
chmod 0755 /usr/local/sbin/ciss-memwipe
### Systemd service: load at boot, execute on shutdown.
### Systemd service: load at boot, execute on shutdown. ------------------------------------------------------------------------
cat << 'EOF' >| /etc/systemd/system/ciss-memwipe.service
[Unit]
Description=CISS: preload and execute kexec-based RAM wipe on shutdown