# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="A script to configure wireless networking for Gentoo" SRC_URI="http://rsm.demon.co.uk/~roy/downloads/${P}.tar.bz2" HOMEPAGE="http://rsm.demon.co.uk/~roy/downloads.php" KEYWORDS="~x86" SLOT="0" LICENSE="GPL-2" DEPEND="net-wireless/wireless-tools >=sys-apps/baselayout-1.8.11" RDEPEND="${DEPEND}" IUSE="" RESTRICT="nomirror" # Test to see if /etc/conf.d/net already has a preup function has_preup=`grep 'preup()' /etc/conf.d/net` has_preup=${has_preup:-"no"} src_install() { insopts -m0644 insinto /etc/init.d doins wireless.sh # Only root should be able to read the configuration file # as it may contain the encryption keys to the network insopts -m0600 insinto /etc/conf.d doins wireless } pkg_postinst() { echo einfo "To complete installation, you must" einfo "1. Update your configuration files:" einfo " etc-update" einfo "2. Patch your net config to load wireless:" einfo " ebuild /var/db/pkg/net-wireless/${PF}/${PF}.ebuild config" if [ "no" != "${has_preup}" ]; then echo ewarn "/etc/conf.d/net already looks like it's been patched" ewarn "or contains a custom preup() function" ewarn ewarn "or you are using >=sys-apps/baselayout-1.10" echo fi einfo "3. Edit the wireless configuration file to match your network" einfo " nano /etc/conf.d/wireless" echo sleep 10 } pkg_config() { cat >> /etc/conf.d/net <=sys-apps/baselayout-1.10" echo fi }