Skip to content

Commit

Permalink
make networks.conf rewrite more strict during import
Browse files Browse the repository at this point in the history
  • Loading branch information
julsemaan committed Oct 26, 2021
1 parent cc8501a commit 7985193
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/functions/configuration.functions
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function rewrite_pf_ip_address() {
# This will rewrite references to the old IP in any routed networks
echo "Rewriting $old_ip to $new_ip in networks.conf"
old_ip_escaped=`echo "$old_ip" | sed 's/\./\\./g'`
sed -i 's/'$old_ip_escaped'/'$new_ip'/g' /usr/local/pf/conf/networks.conf
sed -i 's/=\s*'$old_ip_escaped'\s*$/='$new_ip'/g' /usr/local/pf/conf/networks.conf
else
echo "The new IP ($new_ip) is not in the same network as the previous IP address ($old_ip). This tool will not be able to migrate the configuration in networks.conf. Make sure you adjust it manually with the new IP settings after this script completes. Press enter to continue..."
read
Expand Down

0 comments on commit 7985193

Please sign in to comment.