From e8210827fd59e4539a70af55cb452b211633fedd Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Fri, 22 Mar 2013 12:07:53 +0100 Subject: More possibilities for connection scripts This allows connection scripts to provide defaults, among other things. --- src/lib/connections/bond | 1 + src/lib/connections/bridge | 1 + src/lib/connections/tunnel | 2 ++ src/lib/connections/tuntap | 2 ++ src/lib/globals | 1 + src/lib/network | 1 - 6 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/connections/bond b/src/lib/connections/bond index 379e272..bd45b2f 100644 --- a/src/lib/connections/bond +++ b/src/lib/connections/bond @@ -3,6 +3,7 @@ . "$SUBR_DIR/ip" : ${IFENSLAVE:=ifenslave} +: ${BindsToInterfaces=} bond_up() { if is_interface "$Interface"; then diff --git a/src/lib/connections/bridge b/src/lib/connections/bridge index f33295d..11552ce 100644 --- a/src/lib/connections/bridge +++ b/src/lib/connections/bridge @@ -3,6 +3,7 @@ . "$SUBR_DIR/ip" : ${BRCTL:=brctl} +: ${BindsToInterfaces=} bridge_up() { if is_interface "$Interface"; then diff --git a/src/lib/connections/tunnel b/src/lib/connections/tunnel index f202371..76b6b5f 100644 --- a/src/lib/connections/tunnel +++ b/src/lib/connections/tunnel @@ -2,6 +2,8 @@ . "$SUBR_DIR/ip" +: ${BindsToInterfaces=} + tunnel_up() { if is_interface "$Interface"; then report_error "Interface '$Interface' already exists" diff --git a/src/lib/connections/tuntap b/src/lib/connections/tuntap index 1ff5203..b0cfa7e 100644 --- a/src/lib/connections/tuntap +++ b/src/lib/connections/tuntap @@ -2,6 +2,8 @@ . "$SUBR_DIR/ip" +: ${BindsToInterfaces=} + tuntap_up() { if is_interface "$Interface"; then report_error "Interface '$Interface' already exists" diff --git a/src/lib/globals b/src/lib/globals index 125d04c..bfb4575 100644 --- a/src/lib/globals +++ b/src/lib/globals @@ -115,6 +115,7 @@ load_profile() { if [[ -x "$PROFILE_DIR/interfaces/$Interface" ]]; then source "$PROFILE_DIR/interfaces/$Interface" fi + source "$CONN_DIR/$Connection" } diff --git a/src/lib/network b/src/lib/network index bc11da7..6ac9d75 100755 --- a/src/lib/network +++ b/src/lib/network @@ -48,7 +48,6 @@ cd / # Expose the profile name Profile=$2 load_profile "$Profile" -source "$CONN_DIR/$Connection" case $1 in start) report_notice "Starting network profile '$Profile'..." -- cgit v1.2.3-24-g4f1b