]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/initscripts/init.d/hostapd
Tried to make hostapd to run without configuration in blue0 and madwifi
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / hostapd
CommitLineData
07603508
CS
1#!/bin/sh
2. /etc/sysconfig/rc
3. ${rc_functions}
4
5case "${1}" in
6 start)
7 /usr/local/bin/wlanconfig ath0 destroy
8 /usr/local/bin/wlanconfig blue0 create wlandev wifi0 wlanmode ap
9 /usr/sbin/iwconfig blue0 channel 05
10 /usr/bin/hostapd -P /var/run/hostapd /etc/hostapd.conf &
11 evaluate_retval
12 ;;
13
14 stop)
15 # Just make shure when going down the first time blue0 nw values are ignored
16 sed -i -e 's/^ACTION=="add", SUBSYSTEM=="net", SYSFS{address}=="*", NAME="blue0"*/#ACTION=="add", SUBSYSTEM=="net", SYSFS{address}=="*", NAME="blue0"*/' /etc/udev/rules.d/30-persistent-network.rules
17 /usr/local/bin/wlanconfig blue0 destroy
18 killproc /usr/bin/hostapd
19 evaluate_retval
20 ;;
21
22 restart)
23 ${0} stop
24 sleep 1
25 ${0} start
26 ;;
27
28 status)
29 statusproc /usr/bin/hostapd
30 ;;
31
32 *)
33 echo "Usage: ${0} {start|stop|restart|status}"
34 exit 1
35 ;;
36esac