File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ for _jail in ${JAILS}; do
82
82
ips=$( bastille config " ${_jail} " get ip4.addr)
83
83
ips=" ${ips} $( bastille config " ${_jail} " get ip6.addr) "
84
84
for ip in ${ips} ; do
85
- ip=$( printf " $ip " | sed -E ' s,/[0-9]+,, ' )
85
+ ip=${ip %%/* }
86
86
if [ -n " ${ip} " ]; then
87
87
if ifconfig | grep -wF " ${ip} " > /dev/null; then
88
88
error_notify " Error: IP address (${ip} ) already in use."
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ for _jail in ${JAILS}; do
74
74
jail -f " ${bastille_jailsdir} /${_jail} /jail.conf" -r " ${_jail} "
75
75
76
76
# # remove (captured above) ipX.addr from firewall table
77
- if [ -n " ${bastille_network_loopback} " && ! -z " ${ips} " ]; then
77
+ if [ -n " ${bastille_network_loopback} " ] && [ ! -z " ${ips} " ]; then
78
78
if grep -qw " interface.*=.*${bastille_network_loopback} " " ${bastille_jailsdir} /${_jail} /jail.conf" ; then
79
79
for _ip in ${ips} ; do
80
80
pfctl -q -t " ${bastille_network_pf_table} " -T delete " ${_ip} "
You can’t perform that action at this time.
0 commit comments