diff --git a/src/netctl.in b/src/netctl.in index 6babecf..fa08490 100644 --- a/src/netctl.in +++ b/src/netctl.in @@ -111,7 +111,8 @@ 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 2>/dev/null + [[ $? -eq 1 ]] && BindsToInterfaces=$Interface if (( ${#BindsToInterfaces[@]} )); then : ${InterfaceRoot=sys/subsystem/net/devices/} printf "BindsTo=$(sd_escape "$InterfaceRoot")%s.device\n" \