Refactor config_file function to improve variable expansion handling for SSH and VERBOSE checks
This commit is contained in:
parent
033ec6731a
commit
30d0b807b8
@ -1226,8 +1226,7 @@ config_file() {
|
|||||||
fi
|
fi
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN1${CL}"
|
echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN1${CL}"
|
||||||
else
|
else
|
||||||
#exit_script
|
exit_script
|
||||||
echo "test"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1248,7 +1247,7 @@ config_file() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "${SSH}" ]]; then
|
if [[ -n "${SSH-}" ]]; then
|
||||||
if [[ "$SSH" == "yes" ]]; then
|
if [[ "$SSH" == "yes" ]]; then
|
||||||
echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}"
|
echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}"
|
||||||
if [[ ! -z "$SSH_AUTHORIZED_KEY" ]]; then
|
if [[ ! -z "$SSH_AUTHORIZED_KEY" ]]; then
|
||||||
@ -1280,7 +1279,7 @@ config_file() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$VERBOSE" ]]; then
|
if [[ -n "${VERBOSE-}" ]]; then
|
||||||
if [[ "$VERBOSE" == "yes" ]]; then
|
if [[ "$VERBOSE" == "yes" ]]; then
|
||||||
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERBOSE${CL}"
|
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERBOSE${CL}"
|
||||||
elif [[ "$VERBOSE" == "no" ]]; then
|
elif [[ "$VERBOSE" == "no" ]]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user