mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Moved line declaration out of tty conditional
This way it will always be set to ""
This commit is contained in:
@@ -180,6 +180,7 @@ print_line() {
|
|||||||
local service_name="${1}"
|
local service_name="${1}"
|
||||||
local service_state="" ; service_state="$( parse_status "${1}" "${2}" )"
|
local service_state="" ; service_state="$( parse_status "${1}" "${2}" )"
|
||||||
# XXX: What will we do if tput isn't avalable?
|
# XXX: What will we do if tput isn't avalable?
|
||||||
|
local line=""
|
||||||
if (( __tty == 1 )); then
|
if (( __tty == 1 )); then
|
||||||
local NC; NC="$(tput sgr0)" # no color
|
local NC; NC="$(tput sgr0)" # no color
|
||||||
local red=""; red="$(tput setaf 1 bold)"
|
local red=""; red="$(tput setaf 1 bold)"
|
||||||
@@ -192,7 +193,6 @@ print_line() {
|
|||||||
local columns ; columns=$(tput cols)
|
local columns ; columns=$(tput cols)
|
||||||
linewidth=$(( columns - PADDING_CONSTANT - ${#service_name} - ${#service_state} ))
|
linewidth=$(( columns - PADDING_CONSTANT - ${#service_name} - ${#service_state} ))
|
||||||
|
|
||||||
local line=""
|
|
||||||
for i in $(seq 0 "${linewidth}"); do
|
for i in $(seq 0 "${linewidth}"); do
|
||||||
line="${line}-"
|
line="${line}-"
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user