diff --git a/src/meson.build b/src/meson.build index db43edb..cb6dbee 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,11 +1,3 @@ -# Find scripts -module = find_program('zlevis.sh') -setup = find_program('module-setup.sh') - -# Test the scripts -test('zlevis.sh', module, args: '--summary') -test('module-setup.sh', setup, args: '--summary') - # Add paths of scripts to bins bins += join_paths(meson.current_source_dir(), 'zlevis.sh') bins += join_paths(meson.current_source_dir(), 'module-setup.sh') \ No newline at end of file diff --git a/src/module-setup.sh b/src/module-setup.sh index 98401b9..e442625 100755 --- a/src/module-setup.sh +++ b/src/module-setup.sh @@ -1,17 +1,5 @@ #!/bin/bash -# Exit immediately if a command exits with a non-zero status -set -e - -# Summary of the script's functionality -summary="The setup of the dracut module of zlevis" - -# Display summary if requested -if [ "$1" = "--summary" ]; then - echo "$summary" - exit 0 -fi - # Depend on udev-rules and zfs depends() { echo udev-rules zfs @@ -26,7 +14,4 @@ install() { # Run the zlevis decryption hook before the 90zfs hook inst_hook pre-mount 85 "${moddir}/zlevis.sh" inst_simple "${moddir}/zlevis.sh" "/sbin/zlevis.sh" -} - -# Exit with the status of the last command -exit $? \ No newline at end of file +} \ No newline at end of file diff --git a/src/zlevis.sh b/src/zlevis.sh index d5b917b..6ea3c95 100755 --- a/src/zlevis.sh +++ b/src/zlevis.sh @@ -1,17 +1,5 @@ #!/bin/sh -# Exit immediately if a command exits with a non-zero status -set -e - -# Summary of the script's functionality -summary="The dracut module of zlevis" - -# Display summary if requested -if [ "$1" = "--summary" ]; then - echo "$summary" - exit 0 -fi - # Load the ZFS kernel module modprobe zfs 2>/dev/null udevadm settle @@ -29,7 +17,4 @@ if [ $(zpool list -H -o feature@encryption $_root_pool) = "active" ]; then if [ "$_encryption_root" != "-" ]; then zlevis decrypt $_root_pool | zfs load-key -L prompt "$_root_pool" || echo "Failed to unlock $_root_pool with TPM" fi -fi - -# Exit with the status of the last command -exit $? \ No newline at end of file +fi \ No newline at end of file