$( cd /etc/rc.d ; /usr/bin/chmod +x rc.ipw3945d )
$( /sbin/depmod -a )
if [ ! -d /var/run/ipw3945d ]; then
	/usr/bin/mkdir /var/run/ipw3945d
fi
# Adds the module to rc.modules
echo "# Intel Corporation PRO/Wireless 3945ABG driver" >> /etc/rc.d/rc.modules
echo "/sbin/modprobe ipw3945" >> /etc/rc.d/rc.modules
# Adds daemon to start at boot
echo "# Start the ipw3945d." >> /etc/rc.d/rc.S
echo "if [ -x /etc/rc.d/rc.ipw3945d ]; then" >> /etc/rc.d/rc.S
echo "  sh /etc/rc.d/rc.ipw3945d start" >> /etc/rc.d/rc.S
echo "fi" >> /etc/rc.d/rc.S
# Checks if system is up to run the ipw daemon
if [ -f /var/run/syslogd.pid ]; then
	/sbin/modprobe ipw3945
	/etc/rc.d/rc.ipw3945d start
fi
# Adds the right dhcp configuration into rc.inet1.conf
echo "# Added by ipw3945 package" >> /etc/rc.d/rc.inet1.conf
echo "IFNAME[4]=\"wlan0\"" >> /etc/rc.d/rc.inet1.conf
echo "IPADDR[4]=\"\"" >> /etc/rc.d/rc.inet1.conf
echo "NETMASK[4]=\"\"" >> /etc/rc.d/rc.inet1.conf
echo "USE_DHCP[4]=\"yes\"" >> /etc/rc.d/rc.inet1.conf
