From b9bd67488b991056d6371fb7194ab4b574e7bc02 Mon Sep 17 00:00:00 2001 From: "William Hirigoyen (Evolix)" Date: Fri, 24 Dec 2021 10:04:27 +0100 Subject: [PATCH] Reduce IP column width to avoid empty ligne return --- bkctld | 2 +- lib/bkctld-status | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bkctld b/bkctld index a69ba92..03535d3 100755 --- a/bkctld +++ b/bkctld @@ -116,7 +116,7 @@ case "${subcommand}" in ;; "status") jail_name="${2:-}" - printf '%-30s %-10s %-10s %-25s %-40s\n' 'JAIL NAME' 'STATUS' 'PORT' 'RETENTION (DAY/MONTH)' 'IP' + printf '%-30s %-10s %-10s %-25s %-20s\n' 'JAIL NAME' 'STATUS' 'PORT' 'RETENTION (DAY/MONTH)' 'IP' if [ "${jail_name}" = "all" ] || [ -z "${jail_name}" ]; then for jail in $("${LIBDIR}/bkctld-list"); do "${LIBDIR}/bkctld-${subcommand}" "${jail}" diff --git a/lib/bkctld-status b/lib/bkctld-status index 72b23ad..b7cadbb 100755 --- a/lib/bkctld-status +++ b/lib/bkctld-status @@ -27,4 +27,4 @@ status="OFF" port=$("${LIBDIR}/bkctld-port" "${jail_name}") ip=$("${LIBDIR}/bkctld-ip" "${jail_name}" | xargs | tr -s ' ' ',') -echo "${jail_name} ${status} ${port} ${incs_policy} ${ip}" | awk '{ printf("%- 30s %- 10s %- 10s %- 25s %- 40s\n", $1, $2, $3, $4, $5); }' +echo "${jail_name} ${status} ${port} ${incs_policy} ${ip}" | awk '{ printf("%- 30s %- 10s %- 10s %- 25s %- 20s\n", $1, $2, $3, $4, $5); }'