]> git.ipfire.org Git - people/arne_f/network.git/commitdiff
network: Do initial configuration once at boot time.
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 23 Jul 2010 11:40:27 +0000 (13:40 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 23 Jul 2010 11:40:27 +0000 (13:40 +0200)
functions
functions.ppp
functions.virtual
network

index 89a4ed02345c55d3408ff7d15bfbee838c9b6587..befdd14555318daf501c4fb49e68894f5e2447da 100644 (file)
--- a/functions
+++ b/functions
@@ -41,6 +41,3 @@ case "${COLOURS}" in
                ;;
 esac
 
-if [ "$(basename ${0})" = "network" ]; then
-       init_run
-fi
index fa3a7becb0d7cf6899949479b450aecf59db8078..c10e7e7cbbd3973e0a1bbfeb0068510cc90f620a 100644 (file)
@@ -23,7 +23,7 @@ function ppp_init() {
        mkdir -p /var/run/ppp 2>/dev/null
 }
 
-register_init ppp_init
+init_register ppp_init
 
 function ppp_common_ip_pre_up() {
        local zone=${1}
index 9d35e4e8f19fa01b8a8f6209812ba3442f6693f5..74347d73b0706da1fc0fe999a827925ed9af1295 100644 (file)
 
 function virtual_init() {
        module_load 8021q
+
+       ebtables-restore <<EOF
+*filter
+:INPUT ACCEPT
+:FORWARD ACCEPT
+:OUTPUT ACCEPT
+
+*broute
+:BROUTING ACCEPT
+-A BROUTING -p 802_1Q -j DROP
+EOF
 }
 
 init_register virtual_init
diff --git a/network b/network
index d4a75b83bcf0fc4dafacdf23fcc3abd5f764a337..2309848272c0eb1758d95482ccddd394a8c1b6a4 100755 (executable)
--- a/network
+++ b/network
@@ -38,6 +38,10 @@ done
 
 # Process the given action
 case "${action}" in
+       init)
+               init_run
+               ;;
+
        config|port|device|zone|start|stop|restart|status|reset)
                cli_${action} $@
                ;;