cp -rfv {hooks,header*,functions*} $(DESTDIR)/lib/network/
cp -fv sysctl.d/* $(DESTDIR)/usr/lib/sysctl.d/
cp -rfv udev/* $(DESTDIR)/lib/udev
+ cp -rfv network-* $(DESTDIR)/lib/network/
install -m 755 -v ppp/ip-updown $(DESTDIR)/etc/ppp
ln -svf ip-updown $(DESTDIR)/etc/ppp/ip-pre-up
__radvd_write "# This is the radvd daemon configuration file."
__radvd_write "# THIS FILE IS AUTOMATICALLY GENERATED AND WILL OVERWRITE"
__radvd_write "# ANY CUSTOM CHANGES!"
+ __radvd_write "#"
+ __radvd_write "# $(date -u)"
__radvd_write "#\n"
# Write the configuration for all zones.
done
}
+function radvd_clear() {
+ __radvd_clear
+}
+
function __radvd_clear() {
log DEBUG "Clearing radvd config file."
assert isset zone
+ log DEBUG "Writing radvd configuration for ${zone}"
+ echo $zone
+
# If the interface does not provide any routing information,
# we can skip this whole stuff.
if ! routing_db_exists ${zone} ipv6; then
ip_address_add ${zone} ${ADDRESS}/${PREFIX}
- if [ -n "${GATEWAY}" ]; then
- # Save configuration
- routing_db_set ${zone} ipv4 type "${HOOK}"
- routing_db_set ${zone} ipv4 local-ip-address "${ADDRESS}/${PREFIX}"
- routing_db_set ${zone} ipv4 remote-ip-address "${GATEWAY}"
- routing_db_set ${zone} ipv4 active 1
+ # Save configuration
+ routing_db_set ${zone} ipv4 type "${HOOK}"
+ routing_db_set ${zone} ipv4 local-ip-address "${ADDRESS}/${PREFIX}"
+ routing_db_set ${zone} ipv4 remote-ip-address "${GATEWAY}"
+ routing_db_set ${zone} ipv4 active 1
- routing_update ${zone} ipv4
- fi
+ routing_update ${zone} ipv4
exit ${EXIT_OK}
}
ip_address_add ${zone} ${ADDRESS}/${PREFIX}
- if [ -n "${GATEWAY}" ]; then
- routing_db_set ${zone} ipv6 local-ip-address ${ADDRESS}/${PREFIX}
- routing_db_set ${zone} ipv6 remote-ip-address ${GATEWAY}
- routing_db_set ${zone} ipv6 active 1
- routing_default_update
- fi
+ routing_db_set ${zone} ipv6 local-ip-address ${ADDRESS}/${PREFIX}
+ routing_db_set ${zone} ipv6 remote-ip-address ${GATEWAY}
+ routing_db_set ${zone} ipv6 active 1
+ routing_default_update
exit ${EXIT_OK}
}
--- /dev/null
+#!/bin/bash
+###############################################################################
+# #
+# IPFire.org - A linux based firewall #
+# Copyright (C) 2011 Michael Tremer & Christian Schmidt #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+. /lib/network/functions
+
+case "${1}" in
+ start)
+ # Write the radvd configuration file.
+ radvd_write_config
+ ;;
+ stop)
+ # Clear all contents in the configuration file.
+ radvd_clear
+ ;;
+esac
+
+exit ${EXIT_OK}