From 9861d3364993f03bda9ad56e940e27a53edd63fc Mon Sep 17 00:00:00 2001 From: iamromulan <50184035+iamromulan@users.noreply.github.com> Date: Fri, 23 Feb 2024 15:47:05 -0500 Subject: [PATCH] Allow installation of the simplefirewall only If simplefirewall isn't installed upon entering the config menu it will ask to install it --- RMxxx_rgmii_toolkit.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/RMxxx_rgmii_toolkit.sh b/RMxxx_rgmii_toolkit.sh index acb886a..1ad3221 100644 --- a/RMxxx_rgmii_toolkit.sh +++ b/RMxxx_rgmii_toolkit.sh @@ -212,8 +212,22 @@ install_simple_firewall() { configure_simple_firewall() { if [ ! -f "$SIMPLE_FIREWALL_SCRIPT" ]; then - echo "Simple Firewall script not found." - return + echo -e "\033[0;31mSimplefirewall is not installed, would you like to install it?\033[0m" + echo -e "\033[0;32m1) Yes\033[0m" + echo -e "\033[0;31m2) No\033[0m" + read -p "Enter your choice (1-2): " install_choice + + case $install_choice in + 1) + install_simple_firewall + ;; + 2) + return + ;; + *) + echo -e "\033[0;31mInvalid choice. Please select either 1 or 2.\033[0m" + ;; + esac fi echo "Configuring Simple Firewall:"