=== removed file 'zsh-functions/confz_ip_init' --- zsh-functions/confz_ip_init 2014-06-29 02:15:38 +0000 +++ zsh-functions/confz_ip_init 1970-01-01 00:00:00 +0000 @@ -1,34 +0,0 @@ -# vim: ft=zsh noet ts=4 sts=4 sw=4 - -# -# confz functions for dealing with iproute2 -# - - -confz_rename_interface_check() { - checkvars name mac - - # local -A ifaces - local ignored iface mac rest out ok old_name - - out=$( confz_do ip link show ) || die "ip failed" - - ok=0 - while read ignored iface rest; do - read ignored mac rest - if [[ ${iface%:} == $vars[name] ]]; then - [[ $mac == $vars[mac] ]] || \ - "${(qqq)iface%:} already exists with different MAC address" - ok=1 - break - fi - if ! (($+old_name)) && [[ $mac == $vars[mac] ]]; then - old_name=${iface%:} - fi - done <<<$out - - (($+old_name)) || die "could not find interface with MAC: $vars[mac]" - - do_command=( ip link set dev $old_name name $vars[name] ) - (($ok)) -}