35 lines
1.3 KiB
Bash
Executable File
35 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
echo "This script converts certain aspects of old config files, such as renamed variables"
|
|
echo "to the new variable names. It is NOT foolproof, so please check your config files"
|
|
echo "afterwards."
|
|
|
|
IPV6_FORWARD=${IPV6_FORWARD=$IPV6FORWARD}
|
|
IPV6_CONNTRACK=${IPV6_CONNTRACK=$IPV6CONNTRACK}
|
|
IPV6_BLOCKINCOMING=${$IPV6_BLOCKINCOMING=$IPV6BLOCKINCOMING}
|
|
IPV6_MARK=${IPV6_MARK=$IPv6_MARK}
|
|
IPV6_BLOCKED=${IPV6_BLOCKED=$BLOCKEDIPV6}
|
|
IPV6_CLAMPMSS=${IPV6_CLAMPMSS=$CLAMPMSSIPV6}
|
|
IPV6_INT=${IPV6_INT=$IPV6INT}
|
|
IPV6_LAN=${IPV6_LAN=$IPV6LAN}
|
|
IPV6_TRUSTED=${IPV6_TRUSTED=$IPV6TRUSTED}
|
|
IPV6_TCPPORTS=${IPV6_TCPPORTS=$IPV6TCP}
|
|
IPV6_UDPPORTS=${IPV6_UDPPORTS=$IPV6UDP}
|
|
IPV6_FORWARDRANGE=${IPV6_FORWARDRANGE=$IPV6FORWARDRANGE}
|
|
|
|
|
|
sed -e 's/IPV6FORWARD/IPV6_FORWARD/' \
|
|
-e 's/IPV6CONNTRACK/IPV6_CONNTRACK/' \
|
|
-e 's/IPV6BLOCKINCOMING/IPV6_BLOCKINCOMING/' \
|
|
-e 's/IPv6_MARK/IPV6_MARK/' \
|
|
-e 's/BLOCKEDIPV6/IPV6_BLOCKED/' \
|
|
-e 's/CLAMPMSSIPV6/IPV6_CLAMPMSS/' \
|
|
-e 's/IPV6INT/IPV6_INT/' \
|
|
-e 's/IPV6LAN/IPV6_LAN/' \
|
|
-e 's/IPV6TRUSTED/IPV6_TRUSTED/' \
|
|
-e 's/IPV6TCP/IPV6_TCPPORTS/' \
|
|
-e 's/IPV6UDP/IPV6_UDPPORTS/' \
|
|
-e 's/IPV6FORWARDRANGE/IPV6_FORWARDRANGE/' \
|
|
-e 's/IPV6ROUTEDCLIENTBLOCK/IPV6_ROUTEDCLIENTBLOCK/' options >> options.new
|
|
|
|
mv options options.bak
|
|
mv options.new options |