]> git.ipfire.org Git - network.git/commitdiff
Use autotools.
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 6 Sep 2013 13:03:43 +0000 (15:03 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 6 Sep 2013 13:03:43 +0000 (15:03 +0200)
142 files changed:
.gitignore
Makefile [deleted file]
Makefile.am [new file with mode: 0644]
autogen.sh [new file with mode: 0755]
configure.ac [new file with mode: 0644]
man/.gitignore [new file with mode: 0644]
src/dhclient-helper [moved from dhclient-helper with 100% similarity]
src/dhclient-script [moved from dhclient-script with 100% similarity]
src/firewall-config [moved from firewall-config with 100% similarity]
src/firewall4 [moved from firewall4 with 100% similarity]
src/firewall6 [moved from firewall6 with 100% similarity]
src/functions/functions.aiccu [moved from functions.aiccu with 100% similarity]
src/functions/functions.at [moved from functions.at with 100% similarity]
src/functions/functions.auth [moved from functions.auth with 100% similarity]
src/functions/functions.batman-adv [moved from functions.batman-adv with 100% similarity]
src/functions/functions.bonding [moved from functions.bonding with 100% similarity]
src/functions/functions.bridge [moved from functions.bridge with 100% similarity]
src/functions/functions.cli [moved from functions.cli with 100% similarity]
src/functions/functions.cli.firewall [moved from functions.cli.firewall with 100% similarity, mode: 0644]
src/functions/functions.colors [moved from functions.colors with 100% similarity]
src/functions/functions.config [moved from functions.config with 100% similarity]
src/functions/functions.conntrack [moved from functions.conntrack with 100% similarity]
src/functions/functions.constants [moved from functions.constants with 100% similarity]
src/functions/functions.constants-firewall [moved from functions.constants-firewall with 100% similarity]
src/functions/functions.db [moved from functions.db with 100% similarity]
src/functions/functions.device [moved from functions.device with 100% similarity]
src/functions/functions.dhclient [moved from functions.dhclient with 100% similarity]
src/functions/functions.dhcpd [moved from functions.dhcpd with 100% similarity]
src/functions/functions.distro [moved from functions.distro with 100% similarity]
src/functions/functions.dns [moved from functions.dns with 100% similarity]
src/functions/functions.dummy [moved from functions.dummy with 100% similarity]
src/functions/functions.ethernet [moved from functions.ethernet with 100% similarity]
src/functions/functions.firewall [moved from functions.firewall with 100% similarity]
src/functions/functions.firewall-policy [moved from functions.firewall-policy with 100% similarity]
src/functions/functions.firewall-zones [moved from functions.firewall-zones with 100% similarity]
src/functions/functions.he [moved from functions.he with 100% similarity]
src/functions/functions.hook [moved from functions.hook with 100% similarity]
src/functions/functions.hostapd [moved from functions.hostapd with 100% similarity]
src/functions/functions.http [moved from functions.http with 100% similarity]
src/functions/functions.in [moved from functions with 91% similarity]
src/functions/functions.ip [moved from functions.ip with 100% similarity]
src/functions/functions.ip-tunnel [moved from functions.ip-tunnel with 100% similarity]
src/functions/functions.iptables [moved from functions.iptables with 100% similarity]
src/functions/functions.ipv4 [moved from functions.ipv4 with 100% similarity]
src/functions/functions.ipv6 [moved from functions.ipv6 with 100% similarity]
src/functions/functions.isdn [moved from functions.isdn with 100% similarity]
src/functions/functions.list [moved from functions.list with 100% similarity]
src/functions/functions.lock [moved from functions.lock with 100% similarity]
src/functions/functions.logging [moved from functions.logging with 100% similarity]
src/functions/functions.macros [moved from functions.macros with 100% similarity]
src/functions/functions.macvlan [moved from functions.macvlan with 100% similarity]
src/functions/functions.modem [moved from functions.modem with 100% similarity]
src/functions/functions.phy [moved from functions.phy with 100% similarity]
src/functions/functions.ports [moved from functions.ports with 100% similarity]
src/functions/functions.ppp [moved from functions.ppp with 100% similarity]
src/functions/functions.pppoe-server [moved from functions.pppoe-server with 100% similarity]
src/functions/functions.radvd [moved from functions.radvd with 100% similarity]
src/functions/functions.red [moved from functions.red with 100% similarity]
src/functions/functions.route [moved from functions.route with 100% similarity]
src/functions/functions.routing [moved from functions.routing with 100% similarity]
src/functions/functions.serial [moved from functions.serial with 100% similarity]
src/functions/functions.service [moved from functions.service with 100% similarity]
src/functions/functions.stp [moved from functions.stp with 100% similarity]
src/functions/functions.switch [moved from functions.switch with 100% similarity]
src/functions/functions.sysctl [moved from functions.sysctl with 100% similarity]
src/functions/functions.teredo [moved from functions.teredo with 100% similarity]
src/functions/functions.usb [moved from functions.usb with 100% similarity]
src/functions/functions.util [moved from functions.util with 100% similarity]
src/functions/functions.vlan [moved from functions.vlan with 100% similarity]
src/functions/functions.wireless [moved from functions.wireless with 100% similarity]
src/functions/functions.wpa_supplicant [moved from functions.wpa_supplicant with 100% similarity]
src/functions/functions.zone [moved from functions.zone with 100% similarity]
src/header-config [moved from header-config with 100% similarity]
src/header-port [moved from header-port with 100% similarity]
src/header-zone [moved from header-zone with 100% similarity]
src/helpers/aiccu-config-helper [moved from helpers/aiccu-config-helper with 100% similarity]
src/helpers/bridge-stp [moved from helpers/bridge-stp with 100% similarity]
src/helpers/dhcpd-config-helper [moved from helpers/dhcpd-config-helper with 100% similarity]
src/helpers/firewall-kernel-init [moved from helpers/firewall-kernel-init with 100% similarity]
src/helpers/hostapd-config-helper [moved from helpers/hostapd-config-helper with 100% similarity]
src/helpers/miredo-config-helper [moved from helpers/miredo-config-helper with 100% similarity]
src/helpers/miredo-helper [moved from helpers/miredo-helper with 100% similarity]
src/helpers/pppd-angel [moved from helpers/pppd-angel with 100% similarity]
src/helpers/wpa_supplicant [moved from helpers/wpa_supplicant with 100% similarity]
src/helpers/wpa_supplicant-config-helper [moved from helpers/wpa_supplicant-config-helper with 100% similarity]
src/hooks/ports/batman-adv [moved from hooks/ports/batman-adv with 100% similarity]
src/hooks/ports/batman-adv-port [moved from hooks/ports/batman-adv-port with 100% similarity]
src/hooks/ports/bonding [moved from hooks/ports/bonding with 100% similarity]
src/hooks/ports/dummy [moved from hooks/ports/dummy with 100% similarity]
src/hooks/ports/ethernet [moved from hooks/ports/ethernet with 100% similarity]
src/hooks/ports/macvlan [moved from hooks/ports/macvlan with 100% similarity]
src/hooks/ports/vlan [moved from hooks/ports/vlan with 100% similarity]
src/hooks/ports/wireless-ap [moved from hooks/ports/wireless-ap with 100% similarity]
src/hooks/zones/6rd [moved from hooks/zones/6rd with 100% similarity]
src/hooks/zones/6to4-tunnel [moved from hooks/zones/6to4-tunnel with 100% similarity]
src/hooks/zones/aiccu [moved from hooks/zones/aiccu with 100% similarity]
src/hooks/zones/bridge [moved from hooks/zones/bridge with 100% similarity]
src/hooks/zones/bridge.configs/ipv4-dhcp [moved from hooks/zones/bridge.configs/ipv4-dhcp with 100% similarity]
src/hooks/zones/bridge.configs/ipv4-static [moved from hooks/zones/bridge.configs/ipv4-static with 100% similarity]
src/hooks/zones/bridge.configs/ipv6-static [moved from hooks/zones/bridge.configs/ipv6-static with 100% similarity]
src/hooks/zones/bridge.configs/pppoe-server [moved from hooks/zones/bridge.configs/pppoe-server with 100% similarity]
src/hooks/zones/bridge.ports/batman-adv [moved from hooks/zones/bridge.ports/batman-adv with 100% similarity]
src/hooks/zones/bridge.ports/bonding [moved from hooks/zones/bridge.ports/bonding with 100% similarity]
src/hooks/zones/bridge.ports/dummy [moved from hooks/zones/bridge.ports/dummy with 100% similarity]
src/hooks/zones/bridge.ports/ethernet [moved from hooks/zones/bridge.ports/ethernet with 100% similarity]
src/hooks/zones/bridge.ports/macvlan [moved from hooks/zones/bridge.ports/macvlan with 100% similarity]
src/hooks/zones/bridge.ports/vlan [moved from hooks/zones/bridge.ports/vlan with 100% similarity]
src/hooks/zones/bridge.ports/wireless-ap [moved from hooks/zones/bridge.ports/wireless-ap with 100% similarity]
src/hooks/zones/isdn [moved from hooks/zones/isdn with 100% similarity]
src/hooks/zones/isdn-server [moved from hooks/zones/isdn-server with 100% similarity]
src/hooks/zones/modem [moved from hooks/zones/modem with 100% similarity]
src/hooks/zones/pppoe [moved from hooks/zones/pppoe with 100% similarity]
src/hooks/zones/pptp [moved from hooks/zones/pptp with 100% similarity]
src/hooks/zones/switch [moved from hooks/zones/switch with 100% similarity]
src/hooks/zones/teredo [moved from hooks/zones/teredo with 100% similarity]
src/hooks/zones/wireless [moved from hooks/zones/wireless with 100% similarity]
src/hooks/zones/wireless.configs/ipv4-dhcp [moved from hooks/zones/wireless.configs/ipv4-dhcp with 100% similarity]
src/hooks/zones/wireless.configs/ipv4-static [moved from hooks/zones/wireless.configs/ipv4-static with 100% similarity]
src/hooks/zones/wireless.configs/ipv6-static [moved from hooks/zones/wireless.configs/ipv6-static with 100% similarity]
src/macros/DHCP [moved from macros/DHCP with 100% similarity]
src/macros/HTTP [moved from macros/HTTP with 100% similarity]
src/macros/HTTPS [moved from macros/HTTPS with 100% similarity]
src/macros/WWW [moved from macros/WWW with 100% similarity]
src/network [moved from network with 100% similarity]
src/network-radvd-config [moved from network-radvd-config with 100% similarity]
src/network.pc.in [new file with mode: 0644]
src/ppp/dialer [moved from ppp/dialer with 100% similarity]
src/ppp/ip-updown.in [moved from ppp/ip-updown with 98% similarity, mode: 0644]
src/ppp/pppoe-server [moved from ppp/pppoe-server with 100% similarity]
src/sysctl/network.conf [moved from sysctl.d/network.conf with 100% similarity]
src/systemd/firewall-init.service.in [moved from systemd/firewall-init.service with 70% similarity]
src/systemd/firewall4.service.in [moved from systemd/firewall4.service with 74% similarity]
src/systemd/firewall6.service.in [moved from systemd/firewall6.service with 74% similarity]
src/systemd/network-init.service.in [moved from systemd/network-init.service with 87% similarity]
src/systemd/network@.service.in [moved from systemd/network@.service with 80% similarity]
src/tmpfiles/network [moved from network.tmpfiles with 100% similarity]
src/udev/network-hotplug [moved from udev/network-hotplug with 100% similarity]
src/udev/network-hotplug-rename [moved from udev/network-hotplug-rename with 100% similarity]
src/udev/network-hotplug-serial [moved from udev/network-hotplug-serial with 100% similarity]
src/udev/rules.d/50-serial-whitelist.rules [moved from udev/rules.d/50-serial-whitelist.rules with 100% similarity]
src/udev/rules.d/60-net.rules [moved from udev/rules.d/60-net.rules with 100% similarity]
test/load-library [new file with mode: 0755]

index f298e9ea1bc88bd902bbcf48df187434d4344e7e..d522de3925f1772eb9ac646f608caab2e330228d 100644 (file)
@@ -1,3 +1,22 @@
-html
-man/*.[0-9]
-man/*.html
+/Makefile
+/build-aux
+/missing
+/src/functions/functions
+/src/network.pc
+/src/ppp/ip-updown
+/src/systemd/*.service
+/tmp
+/*.tar.bz2
+/*.tar.gz
+/*.tar.xz
+*.log
+*.cache
+*.stamp
+*.trs
+*~
+Makefile.in
+aclocal.m4
+config.status
+configure
+install-sh
+stamp-*
diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
index 7c2addc..0000000
--- a/Makefile
+++ /dev/null
@@ -1,168 +0,0 @@
-###############################################################################
-#                                                                             #
-# IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2012-2013 IPFire Network Development Team                     #
-#                                                                             #
-# 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/>.       #
-#                                                                             #
-###############################################################################
-
-PACKAGE_NAME    = network
-PACKAGE_VERSION = 006
-
-DESTDIR=
-
-# Export HTML documents to this directory.
-HTML_DOCS_DIR = html
-
-prefix=/usr
-bindir=$(prefix)/bin
-sbindir=$(prefix)/sbin
-libdir=$(prefix)/lib
-datadir=$(prefix)/share
-mandir=$(datadir)/man
-sysconfdir=/etc
-localstatedir=/var
-systemdunitdir=$(prefix)/lib/systemd/system
-tmpfilesdir=$(prefix)/lib/tmpfiles.d
-
-# File to store the version number in.
-VERSION_FILE = $(DESTDIR)$(libdir)/network/version
-
-# A list of files which should be removed on "make clean"
-CLEANFILES =
-
-# man pages
-MAN_PAGES = \
-       man/firewall-config.8 \
-       man/network.8 \
-       man/network-config.8 \
-       man/network-device.8 \
-       man/network-dns-server.8 \
-       man/network-port-batman-adv.8 \
-       man/network-port-batman-adv-port.8 \
-       man/network-route.8 \
-       man/network-zone.8 \
-       man/network-zone-6rd.8 \
-       man/network-zone-6to4-tunnel.8 \
-       man/network-zone-aiccu.8 \
-       man/network-zone-bridge.8 \
-       man/network-zone-config-pppoe-server.8 \
-       man/network-zone-pppoe.8 \
-       man/network-zone-pptp.8
-
-MAN_PAGES_HTML = $(patsubst %.xml,%.html,$(MAN_PAGES_XML))
-MAN_PAGES_XML  = $(patsubst %.8,%.xml,$(MAN_PAGES))
-MAN_PAGES_8    = $(filter %.8,$(MAN_PAGES))
-
-CLEANFILES += \
-       $(MAN_PAGES) \
-       $(MAN_PAGES_HTML)
-
-XSLTPROC = xsltproc
-
-XSLTPROC_FLAGS = \
-       --nonet \
-       --stringparam man.output.quietly 1 \
-       --stringparam funcsynopsis.style ansi \
-       --stringparam man.th.extra1.suppress 1 \
-       --stringparam man.authors.section.enabled 1 \
-       --stringparam man.copyright.section.enabled 1
-
-XSLTPROC_COMMAND_MAN = \
-       $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
-               http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
-
-XSLTPROC_COMMAND_HTML = \
-       $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) man/custom-html.xsl $<
-
-man/%.8: man/%.xml
-       $(XSLTPROC_COMMAND_MAN)
-
-man/%.html: man/%.xml man/custom-html.xsl
-       $(XSLTPROC_COMMAND_HTML)
-
-.PHONY: all
-all: $(MAN_PAGES)
-
-.PHONY: install
-install: $(MAN_PAGES)
-       -mkdir -pv $(DESTDIR)$(sysconfdir)/{network/{ports,zones},ppp}
-       -mkdir -pv $(DESTDIR)$(libdir)/{network,sysctl.d,udev}
-       -mkdir -pv $(DESTDIR)$(localstatedir)/log/network
-       -mkdir -pv $(DESTDIR)$(sbindir)
-       -mkdir -pv $(DESTDIR)$(systemdunitdir)
-       -mkdir -pv $(DESTDIR)$(tmpfilesdir)
-       -mkdir -pv $(DESTDIR)$(datadir)/firewall
-
-       install -m 755 -v firewall-config $(DESTDIR)$(sbindir)
-       install -m 755 -v firewall6 $(DESTDIR)$(sbindir)
-       install -m 755 -v firewall4 $(DESTDIR)$(sbindir)
-       install -m 755 -v network $(DESTDIR)$(sbindir)
-
-       cp -rfv {hooks,header*,functions*} $(DESTDIR)$(libdir)/network/
-       cp -fv  sysctl.d/* $(DESTDIR)$(libdir)/sysctl.d/
-       cp -rfv udev/* $(DESTDIR)$(libdir)/udev
-       cp -rfv network-* $(DESTDIR)$(libdir)/network/
-       cp -vf  systemd/*.service $(DESTDIR)$(systemdunitdir)
-       cp -vf network.tmpfiles $(DESTDIR)$(tmpfilesdir)/network.conf
-
-       # Install the helper tools.
-       -mkdir -pv $(DESTDIR)$(libdir)/network/helpers
-       cp -vf helpers/* $(DESTDIR)$(libdir)/network/helpers
-
-       # Install bridge-stp.
-       ln -svf --relative \
-               $(DESTDIR)$(libdir)/network/helpers/bridge-stp \
-               $(DESTDIR)$(sbindir)/
-
-       # Install dhclient script and helper.
-       install -m 755 dhclient-helper $(DESTDIR)$(libdir)/network/
-       install -m 755 dhclient-script $(DESTDIR)$(sbindir)/
-
-       install -m 755 -v ppp/ip-updown $(DESTDIR)$(sysconfdir)/ppp
-       ln -svf ip-updown $(DESTDIR)$(sysconfdir)/ppp/ip-pre-up
-       ln -svf ip-updown $(DESTDIR)$(sysconfdir)/ppp/ip-up
-       ln -svf ip-updown $(DESTDIR)$(sysconfdir)/ppp/ip-down
-       ln -svf ip-updown $(DESTDIR)$(sysconfdir)/ppp/ipv6-up
-       ln -svf ip-updown $(DESTDIR)$(sysconfdir)/ppp/ipv6-down
-       install -m 755 -v ppp/dialer $(DESTDIR)$(libdir)/network/
-
-       # Install pppoe-server wrapper.
-       install -m 755 ppp/pppoe-server $(DESTDIR)$(libdir)/network/
-
-       # Install the firewall macros.
-       cp -av macros $(DESTDIR)$(datadir)/firewall/
-
-       # Create the version file.
-       : > $(VERSION_FILE)
-       echo "# This file is automatically generated." >> $(VERSION_FILE)
-       echo "NETWORK_VERSION=$(PACKAGE_VERSION)" >> $(VERSION_FILE)
-
-       # Install man pages.
-       -mkdir -pv $(DESTDIR)$(mandir)/man8
-       install -v -m 644 $(MAN_PAGES_8) $(DESTDIR)$(mandir)/man8
-
-.PHONY: clean
-clean:
-       rm -f $(CLEANFILES)
-
-dist:
-       git archive --format tar --prefix $(PACKAGE_NAME)-$(PACKAGE_VERSION)/ HEAD | gzip -9 > \
-               $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz
-
-.PHONY: export-html-docs
-export-html-docs: $(MAN_PAGES_HTML)
-       mkdir -pv $(HTML_DOCS_DIR)
-       cp -vf $^ $(HTML_DOCS_DIR)
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..bafbc88
--- /dev/null
@@ -0,0 +1,411 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2012-2013 IPFire Network Development Team                     #
+#                                                                             #
+# 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/>.       #
+#                                                                             #
+###############################################################################
+
+ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+AM_MAKEFLAGS = --no-print-directory
+AUTOMAKE_OPTIONS = color-tests
+
+# remove target it the command fails
+.DELETE_ON_ERROR:
+
+# keep itermediate files
+.SECONDARY:
+
+libexecdir       = $(prefix)/lib
+pkgconfigdatadir = $(datadir)/pkgconfig
+pppdir           = $(sysconfdir)/ppp
+sysctldir        = $(prefix)/lib/sysctl.d
+tmpfilesdir      = $(prefix)/lib/tmpfiles.d
+udevrulesdir     = $(udevdir)/rules.d
+
+networkdir       = $(libexecdir)/network
+helpersdir       = $(networkdir)/helpers
+
+macrosdir        = $(libexecdir)/firewall/macros
+
+hooksdir         = $(networkdir)/hooks
+hooks_portsdir   = $(hooksdir)/ports
+hooks_zonesdir   = $(hooksdir)/zones
+
+CLEANFILES =
+DISTCLEANFILES =
+EXTRA_DIST =
+INSTALL_DIRS =
+INSTALL_EXEC_HOOKS =
+UNINSTALL_EXEC_HOOKS =
+noinst_DATA =
+
+DISTCHECK_CONFIGURE_FLAGS = \
+       --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \
+       --with-udevdir=$$dc_install_base/$(udevdir)
+
+install-directories-hook:
+       $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
+
+INSTALL_EXEC_HOOKS += \
+       install-directories-hook
+
+# ------------------------------------------------------------------------------
+
+AM_V_XSLT   = $(AM_V_XSLT_$(V))
+AM_V_XSLT_  = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
+AM_V_XSLT_0 = @echo "  XSLT    " $@;
+
+# ------------------------------------------------------------------------------
+
+dist_doc_DATA = \
+       README
+
+dist_sbin_SCRIPTS = \
+       src/dhclient-script \
+       src/firewall-config \
+       src/firewall4 \
+       src/firewall6 \
+       src/network
+
+network_SCRIPTS = \
+       src/functions/functions
+
+CLEANFILES += \
+       src/functions/functions
+
+EXTRA_DIST += \
+       src/functions/functions.in
+
+dist_network_SCRIPTS = \
+       src/functions/functions.aiccu \
+       src/functions/functions.at \
+       src/functions/functions.auth \
+       src/functions/functions.batman-adv \
+       src/functions/functions.bonding \
+       src/functions/functions.bridge \
+       src/functions/functions.cli \
+       src/functions/functions.cli.firewall \
+       src/functions/functions.colors \
+       src/functions/functions.config \
+       src/functions/functions.conntrack \
+       src/functions/functions.constants \
+       src/functions/functions.constants-firewall \
+       src/functions/functions.db \
+       src/functions/functions.device \
+       src/functions/functions.dhclient \
+       src/functions/functions.dhcpd \
+       src/functions/functions.distro \
+       src/functions/functions.dns \
+       src/functions/functions.dummy \
+       src/functions/functions.ethernet \
+       src/functions/functions.firewall \
+       src/functions/functions.firewall-policy \
+       src/functions/functions.firewall-zones \
+       src/functions/functions.he \
+       src/functions/functions.hook \
+       src/functions/functions.hostapd \
+       src/functions/functions.http \
+       src/functions/functions.ip \
+       src/functions/functions.iptables \
+       src/functions/functions.ip-tunnel \
+       src/functions/functions.ipv4 \
+       src/functions/functions.ipv6 \
+       src/functions/functions.isdn \
+       src/functions/functions.list \
+       src/functions/functions.lock \
+       src/functions/functions.logging \
+       src/functions/functions.macros \
+       src/functions/functions.macvlan \
+       src/functions/functions.modem \
+       src/functions/functions.phy \
+       src/functions/functions.ports \
+       src/functions/functions.ppp \
+       src/functions/functions.pppoe-server \
+       src/functions/functions.radvd \
+       src/functions/functions.red \
+       src/functions/functions.route \
+       src/functions/functions.routing \
+       src/functions/functions.serial \
+       src/functions/functions.service \
+       src/functions/functions.stp \
+       src/functions/functions.switch \
+       src/functions/functions.sysctl \
+       src/functions/functions.teredo \
+       src/functions/functions.usb \
+       src/functions/functions.util \
+       src/functions/functions.vlan \
+       src/functions/functions.wireless \
+       src/functions/functions.wpa_supplicant \
+       src/functions/functions.zone \
+       src/network-radvd-config \
+       src/dhclient-helper \
+       src/header-config \
+       src/header-port \
+       src/header-zone \
+       src/ppp/dialer \
+       src/ppp/pppoe-server
+
+dist_helpers_SCRIPTS = \
+       src/helpers/aiccu-config-helper \
+       src/helpers/bridge-stp \
+       src/helpers/dhcpd-config-helper \
+       src/helpers/firewall-kernel-init \
+       src/helpers/hostapd-config-helper \
+       src/helpers/miredo-config-helper \
+       src/helpers/miredo-helper \
+       src/helpers/pppd-angel \
+       src/helpers/wpa_supplicant \
+       src/helpers/wpa_supplicant-config-helper
+
+bridge-stp-install-hook:
+       ln -svf --relative $(DESTDIR)$(helpersdir)/bridge-stp $(DESTDIR)$(sbindir)/
+
+bridge-stp-uninstall-hook:
+       rm -f $(DESTDIR)$(sbindir)/bridge-stp
+
+INSTALL_EXEC_HOOKS += bridge-stp-install-hook
+UNINSTALL_EXEC_HOOKS += bridge-stp-uninstall-hook
+
+dist_hooks_ports_SCRIPTS = \
+       src/hooks/ports/batman-adv \
+       src/hooks/ports/batman-adv-port \
+       src/hooks/ports/bonding \
+       src/hooks/ports/dummy \
+       src/hooks/ports/ethernet \
+       src/hooks/ports/macvlan \
+       src/hooks/ports/vlan \
+       src/hooks/ports/wireless-ap
+
+dist_hooks_zones_SCRIPTS = \
+       src/hooks/zones/6rd \
+       src/hooks/zones/6to4-tunnel \
+       src/hooks/zones/aiccu \
+       src/hooks/zones/batman-adv \
+       src/hooks/zones/bridge \
+       src/hooks/zones/isdn \
+       src/hooks/zones/isdn-server \
+       src/hooks/zones/modem \
+       src/hooks/zones/pppoe \
+       src/hooks/zones/pptp \
+       src/hooks/zones/switch \
+       src/hooks/zones/teredo \
+       src/hooks/zones/wireless
+
+# ------------------------------------------------------------------------------
+
+ppp_SCRIPTS = \
+       src/ppp/ip-updown
+
+CLEANFILES += \
+       src/ppp/ip-updown
+
+EXTRA_DIST += \
+       src/ppp/ip-updown.in
+
+INSTALL_DIRS += \
+       $(pppdir)
+
+ppp-install-hook:
+       ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-pre-up
+       ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-up
+       ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-down
+       ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-up
+       ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-down
+
+ppp-uninstall-hook:
+       rm -f $(DESTDIR)$(pppdir)/ip-{down,pre-up,up}
+       rm -f $(DESTDIR)$(pppdir)/ipv6-{down,up}
+
+INSTALL_EXEC_HOOKS += ppp-install-hook
+UNINSTALL_EXEC_HOOKS += ppp-uninstall-hook
+
+# ------------------------------------------------------------------------------
+
+if HAVE_SYSTEMD
+systemdsystemunit_DATA = \
+       src/systemd/firewall4.service \
+       src/systemd/firewall6.service \
+       src/systemd/firewall-init.service \
+       src/systemd/network-init.service \
+       src/systemd/network@.service
+
+CLEANFILES += \
+       $(systemdsystemunit_DATA)
+
+INSTALL_DIRS += \
+       $(systemdsystemunitdir)
+endif
+
+EXTRA_DIST += \
+       src/systemd/firewall4.service.in \
+       src/systemd/firewall6.service.in \
+       src/systemd/firewall-init.service.in \
+       src/systemd/network-init.service.in \
+       src/systemd/network@.service.in
+
+# ------------------------------------------------------------------------------
+
+dist_sysctl_DATA = \
+       src/sysctl/network.conf
+
+# ------------------------------------------------------------------------------
+
+dist_tmpfiles_DATA = \
+       src/tmpfiles/network
+
+# ------------------------------------------------------------------------------
+
+if HAVE_UDEV
+dist_udev_SCRIPTS = \
+       src/udev/network-hotplug \
+       src/udev/network-hotplug-rename \
+       src/udev/network-hotplug-serial
+
+dist_udevrules_DATA = \
+       src/udev/rules.d/50-serial-whitelist.rules \
+       src/udev/rules.d/60-net.rules
+
+INSTALL_DIRS += \
+       $(udevdir) \
+       $(udevrulesdir)
+endif
+
+# ------------------------------------------------------------------------------
+
+pkgconfigdata_DATA = \
+       src/network.pc
+
+CLEANFILES += \
+       $(pkgconfigdata_DATA)
+
+EXTRA_DIST += \
+       src/network.pc.in
+
+# ------------------------------------------------------------------------------
+
+dist_macros_DATA = \
+       src/macros/DHCP \
+       src/macros/HTTP \
+       src/macros/HTTPS \
+       src/macros/WWW
+
+# ------------------------------------------------------------------------------
+
+MANPAGES = \
+       man/firewall-config.8 \
+       man/network.8 \
+       man/network-config.8 \
+       man/network-device.8 \
+       man/network-dns-server.8 \
+       man/network-port-batman-adv.8 \
+       man/network-port-batman-adv-port.8 \
+       man/network-route.8 \
+       man/network-zone.8 \
+       man/network-zone-6rd.8 \
+       man/network-zone-6to4-tunnel.8 \
+       man/network-zone-aiccu.8 \
+       man/network-zone-bridge.8 \
+       man/network-zone-config-pppoe-server.8 \
+       man/network-zone-pppoe.8 \
+       man/network-zone-pptp.8
+
+MANPAGES_XML  = $(patsubst %.8,%.xml,$(MANPAGES))
+MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
+
+.PHONY: man
+man: $(MANPAGES) $(MANPAGES_HTML)
+
+man_MANS = \
+       $(MANPAGES)
+
+noinst_DATA += \
+       $(MANPAGES_HTML)
+
+CLEANFILES += \
+       $(man_MANS) \
+       $(MANPAGES_HTML)
+
+EXTRA_DIST += \
+       $(MANPAGES_XML) \
+       man/custom-html.xsl
+
+XSLTPROC_FLAGS = \
+       --nonet \
+       --stringparam man.output.quietly 1 \
+       --stringparam funcsynopsis.style ansi \
+       --stringparam man.th.extra1.suppress 1 \
+       --stringparam man.authors.section.enabled 1 \
+       --stringparam man.copyright.section.enabled 1
+
+XSLTPROC_COMMAND_MAN = \
+       $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
+               http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+
+XSLTPROC_COMMAND_HTML = \
+       $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
+
+man/%.8: man/%.xml
+       $(XSLTPROC_COMMAND_MAN)
+
+man/%.html: man/%.xml man/custom-html.xsl
+       $(XSLTPROC_COMMAND_HTML)
+
+# ------------------------------------------------------------------------------
+
+substitutions = \
+       '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
+       '|PACKAGE_URL=$(PACKAGE_URL)|' \
+       '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
+       '|prefix=$(prefix)|' \
+       '|exec_prefix=$(exec_prefix)|' \
+       '|sbindir=$(sbindir)|' \
+       '|networkdir=$(networkdir)|'
+
+SED_PROCESS = \
+       $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+       $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
+               < $< > $@
+
+src/functions/functions: src/functions/functions.in Makefile
+       $(SED_PROCESS)
+
+src/ppp/ip-updown: src/ppp/ip-updown.in Makefile
+       $(SED_PROCESS)
+
+src/systemd/%: src/systemd/%.in Makefile
+       $(SED_PROCESS)
+
+src/%.pc: src/%.pc.in Makefile
+       $(SED_PROCESS)
+
+INSTALL_DIRS += \
+       $(sbindir)
+
+install-exec-hook: $(INSTALL_EXEC_HOOKS)
+
+uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
+
+# - testsuite ------------------------------------------------------------------
+
+TESTS_ENVIRONMENT = \
+       topdir="$(shell pwd)" \
+       networkdir="$(top_srcdir)/src/functions"
+
+dist_check_SCRIPTS = \
+       test/load-library
+
+TESTS = \
+       test/load-library
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..c08fadf
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+autoreconf --force --install --symlink
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..f3dd33b
--- /dev/null
@@ -0,0 +1,82 @@
+###############################################################################
+#                                                                             #
+# Pakfire - The IPFire package management system                              #
+# Copyright (C) 2013 IPFire Network Development Team                          #
+#                                                                             #
+# 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/>.       #
+#                                                                             #
+###############################################################################
+
+AC_PREREQ([2.64])
+
+AC_INIT([network],
+       [006],
+       [info@ipfire.org],
+       [network],
+       [http://www.ipfire.org/])
+
+AC_CONFIG_AUX_DIR([build-aux])
+
+AC_PREFIX_DEFAULT([/usr])
+
+AM_INIT_AUTOMAKE([
+       foreign
+       1.11
+       -Wall
+       -Wno-portability
+       silent-rules
+       tar-pax
+       subdir-objects
+])
+AM_SILENT_RULES([yes])
+
+AC_PROG_LN_S
+AC_PROG_MKDIR_P
+AC_PROG_SED
+
+AC_PATH_PROG([XSLTPROC], [xsltproc])
+
+# pkg-config
+PKG_PROG_PKG_CONFIG
+# This makes sure pkg.m4 is available.
+m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
+
+# ------------------------------------------------------------------------------
+AC_ARG_WITH([systemdsystemunitdir],
+       AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
+       [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
+AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
+AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir"])
+
+# ------------------------------------------------------------------------------
+AC_ARG_WITH([udevdir],
+       AS_HELP_STRING([--with-udevdir=DIR], [Directory for udev files]),
+       [], [with_udevdir=$($PKG_CONFIG --variable=udevdir udev)])
+AC_SUBST([udevdir], [$with_udevdir])
+AM_CONDITIONAL(HAVE_UDEV, [test -n "$with_udevdir"])
+
+# ------------------------------------------------------------------------------
+AC_CONFIG_FILES([
+       Makefile
+])
+
+AC_OUTPUT
+AC_MSG_RESULT([
+       $PACKAGE_NAME $VERSION
+
+       prefix:               $prefix
+
+       systemdsystemunitdir: $systemdsystemunitdir
+       udevdir:              $udevdir
+])
diff --git a/man/.gitignore b/man/.gitignore
new file mode 100644 (file)
index 0000000..237049a
--- /dev/null
@@ -0,0 +1,2 @@
+/*.[13578]
+/*.html
similarity index 100%
rename from dhclient-helper
rename to src/dhclient-helper
similarity index 100%
rename from dhclient-script
rename to src/dhclient-script
similarity index 100%
rename from firewall-config
rename to src/firewall-config
similarity index 100%
rename from firewall4
rename to src/firewall4
similarity index 100%
rename from firewall6
rename to src/firewall6
similarity index 100%
rename from functions.at
rename to src/functions/functions.at
similarity index 100%
rename from functions.auth
rename to src/functions/functions.auth
similarity index 100%
rename from functions.cli
rename to src/functions/functions.cli
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from functions.cli.firewall
rename to src/functions/functions.cli.firewall
similarity index 100%
rename from functions.db
rename to src/functions/functions.db
similarity index 100%
rename from functions.dns
rename to src/functions/functions.dns
similarity index 100%
rename from functions.he
rename to src/functions/functions.he
similarity index 100%
rename from functions.hook
rename to src/functions/functions.hook
similarity index 100%
rename from functions.http
rename to src/functions/functions.http
similarity index 91%
rename from functions
rename to src/functions/functions.in
index 2f6cfdf49f239f3ac00281990671acca530d1e30..61327d58e8e6d0b0197611fc422372c23eb3c649 100644 (file)
--- a/functions
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2012  IPFire Network Development Team                         #
+# Copyright (C) 2012-2013 IPFire Network Development Team                     #
 #                                                                             #
 # 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        #
@@ -36,9 +36,9 @@ function init_run() {
        done
 }
 
-# Include version information.
-. /usr/lib/network/version
+VERSION="@PACKAGE_VERSION@"
+NETWORK_VERSION="${VERSION}"
 
-for file in /usr/lib/network/functions.*; do
+for file in @networkdir@/functions.*; do
        . ${file}
 done
similarity index 100%
rename from functions.ip
rename to src/functions/functions.ip
similarity index 100%
rename from functions.ipv4
rename to src/functions/functions.ipv4
similarity index 100%
rename from functions.ipv6
rename to src/functions/functions.ipv6
similarity index 100%
rename from functions.isdn
rename to src/functions/functions.isdn
similarity index 100%
rename from functions.list
rename to src/functions/functions.list
similarity index 100%
rename from functions.lock
rename to src/functions/functions.lock
similarity index 100%
rename from functions.phy
rename to src/functions/functions.phy
similarity index 100%
rename from functions.ppp
rename to src/functions/functions.ppp
similarity index 100%
rename from functions.red
rename to src/functions/functions.red
similarity index 100%
rename from functions.stp
rename to src/functions/functions.stp
similarity index 100%
rename from functions.usb
rename to src/functions/functions.usb
similarity index 100%
rename from functions.util
rename to src/functions/functions.util
similarity index 100%
rename from functions.vlan
rename to src/functions/functions.vlan
similarity index 100%
rename from functions.zone
rename to src/functions/functions.zone
similarity index 100%
rename from header-config
rename to src/header-config
similarity index 100%
rename from header-port
rename to src/header-port
similarity index 100%
rename from header-zone
rename to src/header-zone
similarity index 100%
rename from helpers/bridge-stp
rename to src/helpers/bridge-stp
similarity index 100%
rename from helpers/pppd-angel
rename to src/helpers/pppd-angel
similarity index 100%
rename from hooks/ports/bonding
rename to src/hooks/ports/bonding
similarity index 100%
rename from hooks/ports/dummy
rename to src/hooks/ports/dummy
similarity index 100%
rename from hooks/ports/macvlan
rename to src/hooks/ports/macvlan
similarity index 100%
rename from hooks/ports/vlan
rename to src/hooks/ports/vlan
similarity index 100%
rename from hooks/zones/6rd
rename to src/hooks/zones/6rd
similarity index 100%
rename from hooks/zones/aiccu
rename to src/hooks/zones/aiccu
similarity index 100%
rename from hooks/zones/bridge
rename to src/hooks/zones/bridge
similarity index 100%
rename from hooks/zones/isdn
rename to src/hooks/zones/isdn
similarity index 100%
rename from hooks/zones/modem
rename to src/hooks/zones/modem
similarity index 100%
rename from hooks/zones/pppoe
rename to src/hooks/zones/pppoe
similarity index 100%
rename from hooks/zones/pptp
rename to src/hooks/zones/pptp
similarity index 100%
rename from hooks/zones/switch
rename to src/hooks/zones/switch
similarity index 100%
rename from hooks/zones/teredo
rename to src/hooks/zones/teredo
similarity index 100%
rename from macros/DHCP
rename to src/macros/DHCP
similarity index 100%
rename from macros/HTTP
rename to src/macros/HTTP
similarity index 100%
rename from macros/HTTPS
rename to src/macros/HTTPS
similarity index 100%
rename from macros/WWW
rename to src/macros/WWW
similarity index 100%
rename from network
rename to src/network
diff --git a/src/network.pc.in b/src/network.pc.in
new file mode 100644 (file)
index 0000000..fd3af83
--- /dev/null
@@ -0,0 +1,28 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2013 IPFire Network Development Team                          #
+#                                                                             #
+# 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/>.       #
+#                                                                             #
+###############################################################################
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+networkdir=@networkdir@
+
+Name: network
+Description: Network configuration tools for IPFire
+URL: @PACKAGE_URL@
+Version: @PACKAGE_VERSION@
similarity index 100%
rename from ppp/dialer
rename to src/ppp/dialer
old mode 100755 (executable)
new mode 100644 (file)
similarity index 98%
rename from ppp/ip-updown
rename to src/ppp/ip-updown.in
index 9c1ac7e..70fce9d
@@ -31,7 +31,7 @@ for i in ${PPP_VARIABLES}; do
        unset ${i}
 done
 
-. /usr/lib/network/functions
+. @networkdir@/functions
 
 log DEBUG "Called."
 for i in ${PPP_VARIABLES}; do
similarity index 100%
rename from ppp/pppoe-server
rename to src/ppp/pppoe-server
similarity index 70%
rename from systemd/firewall-init.service
rename to src/systemd/firewall-init.service.in
index 5e06bb6ca0378be28803fe259b5061149f2df7a0..24497e938e8dca1dd1868c3f9d04c3ff0cda15f5 100644 (file)
@@ -5,4 +5,4 @@ Before=network.target
 [Service]
 Type=oneshot
 RemainAfterExit=yes
-ExecStart=/usr/lib/network/helpers/firewall-kernel-init
+ExecStart=@helpersdir@/firewall-kernel-init
similarity index 74%
rename from systemd/firewall4.service
rename to src/systemd/firewall4.service.in
index 45d20b2c69e6d51f9386a5dde10f1591c966a6ad..568f5e785af9fcf584c89d76fab5c29238250e9c 100644 (file)
@@ -7,8 +7,8 @@ Requires=firewall-init.service
 [Service]
 Type=oneshot
 RemainAfterExit=yes
-ExecStart=/usr/sbin/firewall4 start
-ExecStop=/usr/sbin/firewall4 stop
+ExecStart=@sbindir@/firewall4 start
+ExecStop=@sbindir@/firewall4 stop
 
 [Install]
 WantedBy=multi-user.target
similarity index 74%
rename from systemd/firewall6.service
rename to src/systemd/firewall6.service.in
index eedeea4ecb5ba7b7273b5c8c068e2ec283e8dd2b..873bfe693485c3f6051b89e500ce6511c817f8b1 100644 (file)
@@ -7,8 +7,8 @@ Requires=firewall-init.service
 [Service]
 Type=oneshot
 RemainAfterExit=yes
-ExecStart=/usr/sbin/firewall6 start
-ExecStop=/usr/sbin/firewall6 stop
+ExecStart=@sbindir@/firewall6 start
+ExecStop=@sbindir@/firewall6 stop
 
 [Install]
 WantedBy=multi-user.target
similarity index 87%
rename from systemd/network-init.service
rename to src/systemd/network-init.service.in
index 8e19244825330a018fe9015282bf5fa3537d3ad3..1292fe6a905a16a36f4c2450c3f6e6d6f0c3c553 100644 (file)
@@ -7,7 +7,7 @@ Requires=firewall-init.service
 
 [Service]
 Type=oneshot
-ExecStart=/usr/sbin/network init
+ExecStart=@sbindir@/network init
 
 [Install]
 WantedBy=multi-user.target
similarity index 80%
rename from systemd/network@.service
rename to src/systemd/network@.service.in
index 592e9feb176f48f7939a9d81afe0558f163a03d2..14da23df1297acb6f919ff971943f93b35400e02 100644 (file)
@@ -8,8 +8,8 @@ Before=network.target
 [Service]
 Type=oneshot
 RemainAfterExit=yes
-ExecStart=/usr/sbin/network zone %I up
-ExecStop=/usr/sbin/network zone %I down
+ExecStart=@sbindir@/network zone %I up
+ExecStop=@sbindir@/network zone %I down
 
 [Install]
 WantedBy=network.target
similarity index 100%
rename from network.tmpfiles
rename to src/tmpfiles/network
diff --git a/test/load-library b/test/load-library
new file mode 100755 (executable)
index 0000000..16f1d95
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+. ${networkdir}/functions
+
+if [ -n "${NETWORK_VERSION}" ]; then
+       exit 0
+fi
+
+exit 1