From 873a5230c4046804f6aee54a5c31f2beade2d1b6 Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Mon, 6 Jan 2025 08:57:00 -0700 Subject: [PATCH] common: 0>1 for base interface grep --- usr/local/share/bastille/common.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr/local/share/bastille/common.sh b/usr/local/share/bastille/common.sh index 35d46126..f2c3b6a3 100644 --- a/usr/local/share/bastille/common.sh +++ b/usr/local/share/bastille/common.sh @@ -236,8 +236,8 @@ generate_vnet_jail_netblock() { local vnet_num_range=$((_vnet_if_count + 1)) if [ -n "${use_unique_bridge}" ]; then if [ "${_epair_if_count}" -gt 0 ]; then - for _num in $(seq 0 "${epair_num_range}"); do - if ! grep -Eosq "epair${_num}" ${bastille_jailsdir}/*/jail.conf; then + for _num in $(seq 1 "${epair_num_range}"); do + if ! grep -osq "epair${_num}" ${bastille_jailsdir}/*/jail.conf; then local uniq_epair_bridge="${_num}" break fi @@ -247,8 +247,8 @@ generate_vnet_jail_netblock() { fi else if [ "${_vnet_if_count}" -gt 0 ]; then - for _num in $(seq 0 "${vnet_num_range}"); do - if ! grep -Eosq "bastillle${_num}" ${bastille_jailsdir}/*/jail.conf; then + for _num in $(seq 1 "${vnet_num_range}"); do + if ! grep -osq "bastillle${_num}" ${bastille_jailsdir}/*/jail.conf; then local uniq_epair="bastille${_num}" break fi