Add bash menu and branding
This commit is contained in:
@@ -58,7 +58,7 @@ Boot the target machine from the image, inspect the disk list, and choose the ex
|
||||
|
||||
Choose `nwipe` from the startup menu to use its interactive interface. Its PDF certificates are saved under `/var/log/ep-eraser/reports`; copy them to persistent storage before rebooting because the live system's filesystem is temporary. Press `c` in nwipe to edit certificate details such as company, customer, and host information. Those settings are also temporary unless included in the image.
|
||||
|
||||
To brand certificates, place your JPEG logo at `config/includes.chroot/etc/nwipe/logo.jpg` before building. Nwipe is built from upstream v0.42, which supports this `logo.jpg` branding file. You can also include `/etc/nwipe/nwipe.conf` in `config/includes.chroot` to ship default certificate settings.
|
||||
The supplied `config/includes.chroot/etc/nwipe/eternity-project-logo.svg` is converted to `logo.jpg` during image preparation for nwipe PDF certificates. The same logo is rendered as a colored startup screen above the tty1 menu. Nwipe is built from upstream v0.42 and uses `/etc/nwipe/logo.jpg` for PDF branding. You can include `/etc/nwipe/nwipe.conf` in `config/includes.chroot` to ship default certificate settings.
|
||||
|
||||
NetworkManager provides network connectivity; wired Ethernet uses DHCP automatically, and Wi-Fi can be configured with `nmcli device wifi list` followed by `nmcli device wifi connect "SSID" --ask`. The image starts SSH and Telnet servers for the `eraser` account with password `eperaser`; root SSH login is disabled. The account can run only the EP Eraser and nwipe programs through passwordless `sudo`, for example `sudo -n /usr/local/sbin/ep-eraser` or `sudo -n /usr/local/bin/nwipe`.
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
@@ -123,15 +123,39 @@ run_nwipe() {
|
||||
fi
|
||||
}
|
||||
|
||||
run_bash() {
|
||||
local status
|
||||
cd /root
|
||||
if bash --login </dev/tty >/dev/tty 2>&1; then
|
||||
status=0
|
||||
else
|
||||
status=$?
|
||||
fi
|
||||
|
||||
if [ "$status" -ne 0 ]; then
|
||||
printf '\nBash exited with status %s. Returning to the tool menu.\n' "$status"
|
||||
fi
|
||||
}
|
||||
|
||||
show_startup_screen() {
|
||||
if command -v chafa >/dev/null 2>&1 && [ -f /etc/nwipe/logo.jpg ]; then
|
||||
chafa --format symbols --symbols block --colors 16 --size 44x11 \
|
||||
/etc/nwipe/logo.jpg </dev/tty >/dev/tty 2>&1 || true
|
||||
printf '\n' >/dev/tty
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
[ "$(id -u)" -eq 0 ] || { echo 'This tool must run as root.' >&2; exit 1; }
|
||||
show_startup_screen
|
||||
while true; do
|
||||
printf '\nEP ERASER - disk sanitization tools\n===================================\n'
|
||||
printf '1) EP Eraser (device-specific)\n2) nwipe (interactive)\nq) Quit\nChoose a tool: '
|
||||
printf '1) EP Eraser (device-specific)\n2) nwipe (interactive)\n3) Bash shell (root)\nq) Quit\nChoose a tool: '
|
||||
read -r choice
|
||||
case "$choice" in
|
||||
1) run_ep_eraser ;;
|
||||
2) run_nwipe ;;
|
||||
3) run_bash ;;
|
||||
q) exit 0 ;;
|
||||
*) die 'Invalid selection.' ;;
|
||||
esac
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
bash
|
||||
chafa
|
||||
coreutils
|
||||
hdparm
|
||||
inetutils-telnet
|
||||
|
||||
Reference in New Issue
Block a user