Browse Source

ocserv: simplify IPv6 network setting

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
lilik-openwrt-22.03
Nikos Mavrogiannopoulos 9 years ago
parent
commit
ce06021897
2 changed files with 1 additions and 6 deletions
  1. +0
    -1
      net/ocserv/files/ocserv.conf.template
  2. +1
    -5
      net/ocserv/files/ocserv.init

+ 0
- 1
net/ocserv/files/ocserv.conf.template View File

@ -268,7 +268,6 @@ ipv4-netmask = |NETMASK|
# The IPv6 subnet that leases will be given from. # The IPv6 subnet that leases will be given from.
|ENABLE_IPV6|ipv6-network = |IPV6ADDR| |ENABLE_IPV6|ipv6-network = |IPV6ADDR|
|ENABLE_IPV6|ipv6-prefix = |IPV6PREFIX|
# The domains over which the provided DNS should be used. Use # The domains over which the provided DNS should be used. Use
# multiple lines for multiple domains. # multiple lines for multiple domains.


+ 1
- 5
net/ocserv/files/ocserv.init View File

@ -30,9 +30,6 @@ setup_config() {
test -z $default_domain && enable_default_domain="" test -z $default_domain && enable_default_domain=""
test -z $ip6addr && enable_ipv6="#" test -z $ip6addr && enable_ipv6="#"
ipv6_addr=`echo $ip6addr|cut -d '/' -f 1`
ipv6_prefix=`echo $ip6addr|cut -d '/' -f 2`
test $auth = "plain" && authsuffix="\[passwd=/var/etc/ocpasswd\]" test $auth = "plain" && authsuffix="\[passwd=/var/etc/ocpasswd\]"
dyndns="false" dyndns="false"
@ -54,8 +51,7 @@ setup_config() {
-e "s/|COMPRESSION|/$enable_compression/g" \ -e "s/|COMPRESSION|/$enable_compression/g" \
-e "s/|IPV4ADDR|/$ipaddr/g" \ -e "s/|IPV4ADDR|/$ipaddr/g" \
-e "s/|NETMASK|/$netmask/g" \ -e "s/|NETMASK|/$netmask/g" \
-e "s/|IPV6ADDR|/$ipv6_addr/g" \
-e "s/|IPV6PREFIX|/$ipv6_prefix/g" \
-e "s#|IPV6ADDR|#$ip6addr#g" \
-e "s/|ENABLE_IPV6|/$enable_ipv6/g" \ -e "s/|ENABLE_IPV6|/$enable_ipv6/g" \
/etc/ocserv/ocserv.conf.template > /var/etc/ocserv.conf /etc/ocserv/ocserv.conf.template > /var/etc/ocserv.conf
} }


Loading…
Cancel
Save