diff --git a/arkdep b/arkdep index b5150d9..cdcd212 100755 --- a/arkdep +++ b/arkdep @@ -465,6 +465,14 @@ remove_deployment () { declare target=${hits[0]} + printf "Removing $target\n" + + # Ensure deployment is not currently active + if grep -q "$arkdep_dir/deployments/$target/rootfs" /proc/cmdline; then + printf '\e[1;33m\e[0m\e[1m Target is current active deployment\e[0m\n' + continue + fi + if [[ $interactive_mode -eq 1 ]] && [[ $cleanup_no_confirm -ne 1 ]] && [[ $ARKDEP_CONFIRM -ne 1 ]]; then printf "$target will be removed.\n\n" read -p 'Proceed with removal? [Y/n] ' remove_confirm @@ -474,14 +482,6 @@ remove_deployment () { fi fi - printf "Removing $target\n" - - # Ensure deployment is not currently active - if grep -q "$arkdep_dir/deployments/$target/rootfs" /proc/cmdline; then - printf '\e[1;33m\e[0m\e[1m Target is current active deployment\e[0m\n' - continue - fi - # Remove bootloader entry rm -rfv $arkdep_boot/loader/entries/$target.conf rm -rfv $arkdep_boot/arkdep/$target