#Added by slkbuild 0.2
dotnew() {
        NEW="${1}.new"
        OLD="$1"
        if [ ! -e $OLD ]; then
                mv $NEW $OLD
        elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
                rm $NEW
        fi
}
dotnew etc/dbus-1/system.d/dbus-wpa_supplicant.conf
dotnew etc/wpa_supplicant.conf
doinst() {
	# force change on rc.wireless to use -Bwu switches instead of just
	# -Bw.  This shouldn't hurt anything in anyway so this is going to
	# be considered a 'safe' patch.
	[ -r etc/rc.d/rc.wireless ] && sed -i -e 's|-Bwu|-Bw|g' -e 's|-Bw|-Bwu|g' etc/rc.d/rc.wireless
}
doinst
( cd usr/sbin ; rm -rf wpa-cli )
( cd usr/sbin ; ln -sf wpa_cli wpa-cli )
( cd usr/sbin ; rm -rf wpa-supplicant )
( cd usr/sbin ; ln -sf wpa_supplicant wpa-supplicant )
( cd usr/sbin ; rm -rf wpa-passphrase )
( cd usr/sbin ; ln -sf wpa_passphrase wpa-passphrase )
