#note: DISTRO_BINARY_COMPAT and DISTRO_FILE_PREFIX are visible here, exported in 2createpackages.
#140117 xARCHDIR, ARCHDIR and DISTRO_ARCHDIR_SYMLINKS exported in 2createpackages. 
#140117 note, 2createpackages may move /lib, /usr/lib, /usr/bin in template to ARCHDIR subdir.
#190805 fix wpa_supplicant path confusion.
#190807 added scan_ssid=1

echo 'ctrl_interface=/var/run/wpa_supplicant
ap_scan=2
update_config=1

network={
	scan_ssid=1
	ssid="default"
	psk="defaultpsk"
	proto=WPA
	key_mgmt=WPA-PSK
	pairwise=TKIP
	group=TKIP
}' > etc/wpa_supplicant.conf

rm -rf etc/init.d
rm -rf etc/logrotate.d
#190806 need this...
#rm -rf etc/dbus-1

#for slackware...
[ -d usr/share/applications ] && rm -rf usr/share/applications
[ -f usr/bin/wpa_gui ] && rm -f usr/bin/wpa_gui
[ "$xARCHDIR" ] && [ -f usr/bin/${ARCHDIR}/wpa_gui ] && rm -f usr/bin/${ARCHDIR}/wpa_gui
DISABLE_POST_INSTALL_SCRIPT=yes

#190805 buster has it in sbin, pyro has it in usr/sbin
if [ -f sbin/wpa_supplicant ];then
 mkdir -p usr/sbin
 [ ! -e usr/sbin/wpa_supplicant ] && ln -s ../../sbin/wpa_supplicant usr/sbin/wpa_supplicant
fi
