#!/bin/sh
# Copyright (C) 2009 - 2013 vortexbox.org
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#

touch /etc/vortexbox/gateway.mode

yum -y install iwl5000-firmware

cat > /etc/sysconfig/network-scripts/ifcfg-wlan0 <<'EOF'
DEVICE=wlan0
BOOTPROTO=yes
TYPE=Wireless
NM_CONTROLLED=no
ONBOOT=yes
USERCTL=yes
IPV6INIT=no
IPADDR=192.168.19.1
NETMASK=255.255.255.0
PEERDNS=yes
PEERROUTES=yes
ESSID="VortexBox"
MODE=Ad-hoc
RATE=auto
EOF

cat > /etc/dnsmasq.conf <<'EOF'
interface=wlan0
dhcp-range=192.168.19.100,192.168.19.150,12h
dhcp-authoritative
dhcp-lease-max=25
EOF

