From 6a7372af68cd39c9630143742ac36abe63763269 Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Tue, 29 Sep 2020 18:27:52 +0200 Subject: [PATCH] Implemented tests --- scripts/image/setup.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/image/setup.sh b/scripts/image/setup.sh index 957f4fc..388850b 100644 --- a/scripts/image/setup.sh +++ b/scripts/image/setup.sh @@ -476,6 +476,17 @@ if [ "$encrypt_system" == "y" ] echo "sudo cryptsetup -v luksClose root &&" echo "exit || echo 'Error in chroot environment!' echo 'Trying to close decrypted root.'; sudo cryptsetup -v luksClose root" ) | chroot "$root_mount_path" /bin/bash || error + info "Execute file tests..." + info "Testing $mkinitcpio_path..." + if ! grep -q "$replace_modules" "$mkinitcpio_path"; then + error "File $mkinitcpio_path doesn't contain the string: $replace_modules" + fi + if ! grep -q "$replace_hooks" "$mkinitcpio_path"; then + error "File $mkinitcpio_path doesn't contain the string: $replace_hooks" + fi + if ! grep -q "$boot_txt_setenv_replace" "$boot_txt_path"; then + error "File $boot_txt_path doesn't contain the string: $boot_txt_setenv_replace" + fi fi question "Do you want to setup Wifi on the device?(y/N)" && read -r setup_wifi