Fixed a bug affecting slow system and AP services.
The bug was caused by a constant wait time, rather than dynamic. The bug was more likey to affect the airbase-ng service.
This commit is contained in:
parent
1aa3d96c8a
commit
8e0a37218b
|
@ -10,10 +10,6 @@ VIAP=$WIAccessPoint
|
||||||
# and creates a separate interface, atX, for dhcpd.
|
# and creates a separate interface, atX, for dhcpd.
|
||||||
VIAPAddress="$VIGWNetwork.2"
|
VIAPAddress="$VIGWNetwork.2"
|
||||||
|
|
||||||
VIAPRouteDelay=5
|
|
||||||
|
|
||||||
#APServiceConfPath="$FLUXIONWorkspacePath/APService.conf"
|
|
||||||
|
|
||||||
function ap_stop() {
|
function ap_stop() {
|
||||||
killall airbase-ng &> $FLUXIONOutputDevice
|
killall airbase-ng &> $FLUXIONOutputDevice
|
||||||
|
|
||||||
|
@ -41,7 +37,13 @@ function ap_prep() {
|
||||||
|
|
||||||
function ap_start() {
|
function ap_start() {
|
||||||
xterm $BOTTOMRIGHT -bg "#000000" -fg "#FFFFFF" -title "FLUXION AP Service [airbase-ng]" -e airbase-ng -P -e $APTargetSSID -c $APTargetChannel -a $APRogueMAC $VIAP &
|
xterm $BOTTOMRIGHT -bg "#000000" -fg "#FFFFFF" -title "FLUXION AP Service [airbase-ng]" -e airbase-ng -P -e $APTargetSSID -c $APTargetChannel -a $APRogueMAC $VIAP &
|
||||||
sleep $VIAPRouteDelay; ap_route
|
|
||||||
|
# Wait till airebase-ng has started and created the extra virtual interface.
|
||||||
|
while [ ! $(ps a | awk '$5~/^airbase-ng/ && $0~/'"$APRogueMAC"'/{print $1}') ]
|
||||||
|
do sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
ap_route
|
||||||
}
|
}
|
||||||
|
|
||||||
# FLUXSCRIPT END
|
# FLUXSCRIPT END
|
||||||
|
|
|
@ -10,10 +10,6 @@ VIAP=$WIAccessPoint
|
||||||
# to master, which is supported by dhcpd.
|
# to master, which is supported by dhcpd.
|
||||||
VIAPAddress=$VIGWAddress
|
VIAPAddress=$VIGWAddress
|
||||||
|
|
||||||
VIAPRouteDelay=5
|
|
||||||
|
|
||||||
APServiceConfPath="$FLUXIONWorkspacePath/APService.conf"
|
|
||||||
|
|
||||||
function ap_stop() {
|
function ap_stop() {
|
||||||
killall hostapd &> $FLUXIONOutputDevice
|
killall hostapd &> $FLUXIONOutputDevice
|
||||||
|
|
||||||
|
@ -50,7 +46,7 @@ interface=$VIAP
|
||||||
driver=nl80211
|
driver=nl80211
|
||||||
ssid=$APTargetSSID
|
ssid=$APTargetSSID
|
||||||
channel=$APTargetChannel\
|
channel=$APTargetChannel\
|
||||||
" > "$APServiceConfPath"
|
" > "$APRogueMAC-hostapd.conf"
|
||||||
|
|
||||||
# Spoof virtual interface MAC address.
|
# Spoof virtual interface MAC address.
|
||||||
ifconfig $VIAP down
|
ifconfig $VIAP down
|
||||||
|
@ -64,8 +60,14 @@ channel=$APTargetChannel\
|
||||||
}
|
}
|
||||||
|
|
||||||
function ap_start() {
|
function ap_start() {
|
||||||
xterm $HOLD $BOTTOMRIGHT -bg "#000000" -fg "#FFFFFF" -title "FLUXION AP Service [hostapd]" -e hostapd "$APServiceConfPath" &
|
xterm $HOLD $BOTTOMRIGHT -bg "#000000" -fg "#FFFFFF" -title "FLUXION AP Service [hostapd]" -e hostapd "$APRogueMAC-hostapd.conf" &
|
||||||
sleep $VIAPRouteDelay; ap_route
|
|
||||||
|
# Wait till hostapd has started and its virtual interface is ready.
|
||||||
|
while [ ! $(ps a | awk '$5~/^hostapd/ && $0~/'"$APRogueMAC-hostapd.conf"'/{print $1}') ]
|
||||||
|
do sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
ap_route
|
||||||
}
|
}
|
||||||
|
|
||||||
# FLUXSCRIPT END
|
# FLUXSCRIPT END
|
||||||
|
|
Loading…
Reference in New Issue