]>
git.ipfire.org Git - people/ms/network.git/blob - functions.teredo
2 ###############################################################################
4 # IPFire.org - A linux based firewall #
5 # Copyright (C) 2012 IPFire Network Development Team #
7 # This program is free software: you can redistribute it and/or modify #
8 # it under the terms of the GNU General Public License as published by #
9 # the Free Software Foundation, either version 3 of the License, or #
10 # (at your option) any later version. #
12 # This program is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
17 # You should have received a copy of the GNU General Public License #
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
20 ###############################################################################
22 function teredo_start
() {
26 service_start
"miredo-client@${zone}"
29 function teredo_stop
() {
33 # Just stop the miredo daemon for this device.
34 service_stop
"miredo-client@${zone}"
37 function teredo_write_config
() {
47 while [ $# -gt 0 ]; do
50 server
=$
(cli_get_val
${1})
56 # Check if all required parameters are correctly set.
59 # Create the file's directory if necessary and
60 # make sure there is nothing in the file, yet.
61 mkdir
-p $
(dirname ${file}) 2>/dev
/null
66 echo "# This is a miredo client configuration file for ${interface}."
67 echo "# THIS FILE IS AUTOMATICALLY GENERATED AND WILL OVERWRITE"
68 echo "# ANY CUSTOM CHANGES!"
75 # All teredo connections we have are in client mode.
76 echo "RelayType client" >> ${file}
78 # The interface equals the name of the zone.
79 echo "InterfaceName ${zone}" >> ${file}
81 # Add the server information.
82 echo "ServerAddress ${server}" >> ${file}