From b4f7bf8ca067542b48ed4099c9feaf9f62f89a62 Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Sat, 26 Apr 2014 13:39:23 +0200 Subject: Fix default interface bindings (fourth time) The following changes introduced in Bash 4.3 necessitate this commit: - Setting the array attribute no longer initializes an array. - Empty-but-set arrays no longer pass [[ -v ]]. Previous attempts: feb669f4b2a15e6ea1d84be336f12be4650f9d2d 711c46457ae9fef52c7c529d89c67d0d526f73ef e8210827fd59e4539a70af55cb452b211633fedd --- src/netctl.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/netctl.in') diff --git a/src/netctl.in b/src/netctl.in index 6babecf..dc19ab0 100644 --- a/src/netctl.in +++ b/src/netctl.in @@ -111,7 +111,7 @@ unit_enable() { echo ".include @systemdsystemunitdir@/netctl@.service" > "$unit" echo -e "\n[Unit]" >> "$unit" [[ -n $Description ]] && echo "Description=$Description" >> "$unit" - [[ -v BindsToInterfaces ]] || BindsToInterfaces=$Interface + declare -p BindsToInterfaces &> /dev/null || BindsToInterfaces=$Interface if (( ${#BindsToInterfaces[@]} )); then : ${InterfaceRoot=sys/subsystem/net/devices/} printf "BindsTo=$(sd_escape "$InterfaceRoot")%s.device\n" \ -- cgit v1.2.3-24-g4f1b