Add prerequisite check script

This commit is contained in:
Fierelier 2024-02-15 15:51:25 +01:00
parent e0f2a45535
commit 24043720d7
2 changed files with 22 additions and 0 deletions

View File

@ -12,6 +12,8 @@ Prerequisites:
* hdparm (for shutting disks down)
* cryptsetup (for setting up LUKS block devices)
For a basic check of prerequisites, you can run "./check_prereq" as root
Usage:
* Installation: ./install
* Uninstallation: ./uninstall

20
check_prereq Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
prereqs=(
"bash"
"mkdir"
"mount"
"umount"
"eject"
"blkid"
"lsblk"
"findmnt"
"hdparm"
"cryptsetup"
)
for prereq in "${prereqs[@]}"; do
echo -n "$prereq: "
if ! command -v "$prereq"; then
echo "NOT FOUND."
fi
done