forked from ungleich-public/cdist
Use cur_ip in jail for freebsd
This commit is contained in:
parent
352679386d
commit
23debd5b6f
2 changed files with 2 additions and 4 deletions
|
@ -87,9 +87,8 @@ if [ $(expr "${ip}" : ".*, .*") -gt "0" ]; then
|
||||||
SAVE_IFS="$IFS"
|
SAVE_IFS="$IFS"
|
||||||
IFS=", "
|
IFS=", "
|
||||||
for cur_ip in ${ip}; do
|
for cur_ip in ${ip}; do
|
||||||
# TODO BUG? Why is cur_ip unused in the following line?
|
|
||||||
# Just get the last IP address for SSH to listen on
|
# Just get the last IP address for SSH to listen on
|
||||||
mgmt_ip=$(echo "${ip}" | cut '-d ' -f1) # In case using "ip netmask" format rather than CIDR
|
mgmt_ip=$(echo "${cur_ip}" | cut '-d ' -f1) # In case using "ip netmask" format rather than CIDR
|
||||||
done
|
done
|
||||||
IFS="$SAVE_IFS"
|
IFS="$SAVE_IFS"
|
||||||
else
|
else
|
||||||
|
|
|
@ -92,9 +92,8 @@ if [ $(expr "${ip}" : ".*|.*") -gt "0" ]; then
|
||||||
SAVE_IFS="$IFS"
|
SAVE_IFS="$IFS"
|
||||||
IFS=", "
|
IFS=", "
|
||||||
for cur_ip in ${ip}; do
|
for cur_ip in ${ip}; do
|
||||||
# TODO BUG? Why is cur_ip unused in the following line?
|
|
||||||
# Just get the last IP address for SSH to listen on
|
# Just get the last IP address for SSH to listen on
|
||||||
mgmt_ip=$(echo "${ip}" | sed -E -e 's/^.*\|(.*)\/[0-9]+$/\1/')
|
mgmt_ip=$(echo "${cur_ip}" | sed -E -e 's/^.*\|(.*)\/[0-9]+$/\1/')
|
||||||
done
|
done
|
||||||
IFS="$SAVE_IFS"
|
IFS="$SAVE_IFS"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue