=== modified file 'zsh-functions/confz_ip_init' --- zsh-functions/confz_ip_init 2016-02-22 11:51:54 +0000 +++ zsh-functions/confz_ip_init 2014-06-29 02:15:38 +0000 @@ -18,16 +18,16 @@ read ignored mac rest if [[ ${iface%:} == $vars[name] ]]; then [[ $mac == $vars[mac] ]] || \ - die "${(qqq)iface%:} already exists with different MAC address" + "${(qqq)iface%:} already exists with different MAC address" ok=1 break fi - if [[ -z $old_name && $mac == $vars[mac] ]]; then + if ! (($+old_name)) && [[ $mac == $vars[mac] ]]; then old_name=${iface%:} fi done <<<$out - [[ -n $old_name ]] || die "could not find interface with MAC: $vars[mac]" + (($+old_name)) || die "could not find interface with MAC: $vars[mac]" do_command=( ip link set dev $old_name name $vars[name] ) (($ok))