summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setup-interfaces.in8
-rwxr-xr-xtests/setup_interfaces_test12
2 files changed, 8 insertions, 12 deletions
diff --git a/setup-interfaces.in b/setup-interfaces.in
index c5c683f..fe4dac3 100644
--- a/setup-interfaces.in
+++ b/setup-interfaces.in
@@ -493,15 +493,11 @@ prompt_for_interfaces() {
echo "auto $iface" >> interfaces
echo "iface $iface inet $type" >> interfaces
if [ -n "$bridge_ports" ]; then
- if ! [ -f "$ROOT"usr/libexec/ifupdown-ng/bridge ]; then
- PKGS="$PKGS bridge"
- fi
+ PKGS="$PKGS bridge"
echo -e "\tbridge-ports $bridge_ports" >> interfaces
fi
if [ -n "$bond_slaves" ]; then
- if ! [ -f "$ROOT"usr/libexec/ifupdown-ng/bond ]; then
- PKGS="$PKGS bonding"
- fi
+ PKGS="$PKGS bonding"
echo -e "\tbond-slaves $bond_slaves" >> interfaces
fi
if [ -n "$raw_device" ]; then
diff --git a/tests/setup_interfaces_test b/tests/setup_interfaces_test
index e69517e..c189918 100755
--- a/tests/setup_interfaces_test
+++ b/tests/setup_interfaces_test
@@ -7,8 +7,8 @@ init_tests \
setup_interfaces_interactive_vlan \
setup_interfaces_interactive_vlan_ng \
setup_interfaces_interactive_vlan0_ng \
- setup_interfaces_interactive_br0_ng \
- setup_interfaces_interactive_bond0_ng
+ setup_interfaces_interactive_br0 \
+ setup_interfaces_interactive_bond0
setup_interfaces_usage_body() {
test_usage setup-interfaces
@@ -105,7 +105,7 @@ setup_interfaces_interactive_vlan0_ng_body() {
setup-interfaces <answers
}
-setup_interfaces_interactive_br0_ng_body() {
+setup_interfaces_interactive_br0_body() {
init_env
create_fake_ifaces lo eth0
@@ -126,11 +126,11 @@ setup_interfaces_interactive_br0_ng_body() {
)>answers
atf_check -s exit:0 \
-o match:"Available bridge ports are: eth0" \
- -o not-match:"apk add.*bridge" \
+ -o match:"apk add.*bridge" \
setup-interfaces <answers
}
-setup_interfaces_interactive_bond0_ng_body() {
+setup_interfaces_interactive_bond0_body() {
init_env
create_fake_ifaces lo eth0
@@ -149,6 +149,6 @@ setup_interfaces_interactive_bond0_ng_body() {
)>answers
atf_check -s exit:0 \
-o match:"Available interfaces are: eth0" \
- -o not-match:"apk add.*bonding" \
+ -o match:"apk add.*bonding" \
setup-interfaces <answers
}