Commit e8210827 authored by Jouke Witteveen's avatar Jouke Witteveen
Browse files

More possibilities for connection scripts

This allows connection scripts to provide defaults, among other things.
parent c8e96611
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
. "$SUBR_DIR/ip" . "$SUBR_DIR/ip"
: ${IFENSLAVE:=ifenslave} : ${IFENSLAVE:=ifenslave}
: ${BindsToInterfaces=}
bond_up() { bond_up() {
if is_interface "$Interface"; then if is_interface "$Interface"; then
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
. "$SUBR_DIR/ip" . "$SUBR_DIR/ip"
: ${BRCTL:=brctl} : ${BRCTL:=brctl}
: ${BindsToInterfaces=}
bridge_up() { bridge_up() {
if is_interface "$Interface"; then if is_interface "$Interface"; then
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
. "$SUBR_DIR/ip" . "$SUBR_DIR/ip"
: ${BindsToInterfaces=}
tunnel_up() { tunnel_up() {
if is_interface "$Interface"; then if is_interface "$Interface"; then
report_error "Interface '$Interface' already exists" report_error "Interface '$Interface' already exists"
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
. "$SUBR_DIR/ip" . "$SUBR_DIR/ip"
: ${BindsToInterfaces=}
tuntap_up() { tuntap_up() {
if is_interface "$Interface"; then if is_interface "$Interface"; then
report_error "Interface '$Interface' already exists" report_error "Interface '$Interface' already exists"
......
...@@ -115,6 +115,7 @@ load_profile() { ...@@ -115,6 +115,7 @@ load_profile() {
if [[ -x "$PROFILE_DIR/interfaces/$Interface" ]]; then if [[ -x "$PROFILE_DIR/interfaces/$Interface" ]]; then
source "$PROFILE_DIR/interfaces/$Interface" source "$PROFILE_DIR/interfaces/$Interface"
fi fi
source "$CONN_DIR/$Connection"
} }
......
...@@ -48,7 +48,6 @@ cd / ...@@ -48,7 +48,6 @@ cd /
# Expose the profile name # Expose the profile name
Profile=$2 Profile=$2
load_profile "$Profile" load_profile "$Profile"
source "$CONN_DIR/$Connection"
case $1 in case $1 in
start) start)
report_notice "Starting network profile '$Profile'..." report_notice "Starting network profile '$Profile'..."
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment