From 2cfcc4b8ad2b48c8deac4a8d100baad7b8a77b2b Mon Sep 17 00:00:00 2001 From: Christer Edwards Date: Tue, 28 Jan 2020 17:36:17 -0700 Subject: [PATCH 1/2] simplify variable usage in interface validation --- usr/local/share/bastille/create.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/usr/local/share/bastille/create.sh b/usr/local/share/bastille/create.sh index c8fddf71..d3104f28 100644 --- a/usr/local/share/bastille/create.sh +++ b/usr/local/share/bastille/create.sh @@ -67,11 +67,10 @@ validate_ip() { validate_netif() { local LIST_INTERFACES=$(ifconfig -l) - interface=${INTERFACE} - if echo "${LIST_INTERFACES}" | grep -qwo "${INTERFACE}"; then - echo -e "${COLOR_GREEN}Valid: ($interface).${COLOR_RESET}" + if echo "${LIST_INTERFACES} VNET" | grep -qwo "${INTERFACE}"; then + echo -e "${COLOR_GREEN}Valid: (${INTERFACE}).${COLOR_RESET}" else - echo -e "${COLOR_RED}Invalid: ($interface).${COLOR_RESET}" + echo -e "${COLOR_RED}Invalid: (${INTERFACE}).${COLOR_RESET}" exit 1 fi } From 97417b5b4f7815f2fd14de2b92ad3a587e5a546a Mon Sep 17 00:00:00 2001 From: Christer Edwards Date: Tue, 28 Jan 2020 17:36:30 -0700 Subject: [PATCH 2/2] updating import usage output --- usr/local/share/bastille/import.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/local/share/bastille/import.sh b/usr/local/share/bastille/import.sh index f4d730aa..7943174c 100644 --- a/usr/local/share/bastille/import.sh +++ b/usr/local/share/bastille/import.sh @@ -32,7 +32,7 @@ . /usr/local/etc/bastille/bastille.conf usage() { - echo -e "${COLOR_RED}Usage: bastille import [TARGET|list].${COLOR_RESET}" + echo -e "${COLOR_RED}Usage: bastille import backup_file.${COLOR_RESET}" exit 1 }