From d8bf40f7a28f53f2f51c41b77663e5a40a5d8fb4 Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Sat, 7 Jan 2023 15:35:45 -0500 Subject: [PATCH] refactoring --- .../modules.d/10ram-wipe-exit/wipe-ram-needshutdown.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/usr/lib/dracut/modules.d/10ram-wipe-exit/wipe-ram-needshutdown.sh b/usr/lib/dracut/modules.d/10ram-wipe-exit/wipe-ram-needshutdown.sh index e173b1f..3da07c8 100755 --- a/usr/lib/dracut/modules.d/10ram-wipe-exit/wipe-ram-needshutdown.sh +++ b/usr/lib/dracut/modules.d/10ram-wipe-exit/wipe-ram-needshutdown.sh @@ -15,14 +15,10 @@ ram_wipe_check_needshutdown() { if [ "$wipe_action" = "reboot" ]; then info "wipe-ram.sh wiperamexit: reboot..." reboot --force - fi - - if [ "$wipe_action" = "poweroff" ]; then + elif [ "$wipe_action" = "poweroff" ]; then info "wipe-ram.sh wiperamexit: poweroff..." poweroff --force - fi - - if [ "$wipe_action" = "halt" ]; then + elif [ "$wipe_action" = "halt" ]; then info "wipe-ram.sh wiperamexit: halt..." halt --force fi