Skip to content

Commit

Permalink
Merge pull request #239 from mekanix/feature/ipv6-separator
Browse files Browse the repository at this point in the history
Don't use : as separator when replacing IPv6
  • Loading branch information
mekanix authored Aug 9, 2022
2 parents 617167d + 0126463 commit fad5f8b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions scripts/network-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ check_config() {
}


network() {
setup_network() {
interface_config="inet ${INTERFACE_IP} netmask 255.255.255.0 description ${EGRESS}"
interface_alias_config="inet ${JAIL_INTERFACE_IP} netmask 255.255.255.0"
interface_ipv6_config="inet6 -ifdisabled auto_linklocal ${IPV6_PREFIX}:1"
Expand All @@ -59,15 +59,15 @@ network() {
}


pf() {
setup_pf() {
if [ ! -e /etc/pf.conf ]; then
sed \
-e "s:EGRESS:${EGRESS}:g" \
-e "s:JAIL_INTERFACE_IP:${JAIL_INTERFACE_IP}:g" \
-e "s:INTERFACE_IP:${INTERFACE_IP}:g" \
-e "s:INTERFACE:${INTERFACE}:g" \
-e "s:MASTER_IP:${MASTER_IP}:g" \
-e "s:IPV6_PREFIX:${IPV6_PREFIX}:g" \
-e "s;EGRESS;${EGRESS};g" \
-e "s;JAIL_INTERFACE_IP;${JAIL_INTERFACE_IP};g" \
-e "s;INTERFACE_IP;${INTERFACE_IP};g" \
-e "s;INTERFACE;${INTERFACE};g" \
-e "s;MASTER_IP;${MASTER_IP};g" \
-e "s;IPV6_PREFIX;${IPV6_PREFIX};g" \
"${SCRIPT_DIR}/../templates/pf.conf" >/etc/pf.conf
fi
sysrc pflog_enable="YES"
Expand Down Expand Up @@ -143,8 +143,8 @@ setup_unbound() {


check_config
network
pf
setup_network
setup_pf
setup_hostname
setup_rtadvd
setup_nfs
Expand Down

0 comments on commit fad5f8b

Please sign in to comment.