Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating commotion-debug-helper to not use iwinfo or luci_splash #407

Merged
merged 3 commits into from
Aug 13, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
46 changes: 33 additions & 13 deletions files/usr/sbin/cdh.sh → files/usr/sbin/cdh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ network()
echo -e "---------------Smart Gateway Default Route---------------------" >> $FILE
ip route ls table 224 >> $FILE

radio scan
dev scan
dev station dump
}

rules()
Expand All @@ -139,11 +140,8 @@ rules()
flair "UCI Firewall Current State: (uci show -p /var/state firewall)"
uci show -p /var/state firewall >> $FILE

flair "UCI Splash Info:(uci show luci_splash)"
uci show luci_splash >> $FILE

flair "UCI Splash Current State:(uci show -p /var/state luci_splash)"
uci show -p /var/state luci_splash >> $FILE
flair "Nodogsplash Info:(ndsctl status)"
ndsctl status >> $FILE
}

state()
Expand All @@ -166,23 +164,45 @@ state()
flair "Router uptime and Load: (uptime)"
uptime >> $FILE

radio info

phy info
dev info
dev link
}

#======================================================
# radio identifier and Scanner
#=======================================================
radio()
dev()
{
local i=0
local DEV=
while [ $? -eq 0 ]
do
DEV=`uci -P /var/state -q get wireless.@wifi-iface[$i].ifname`
if [ $? -eq 0 ]
then
flair "$DEV $1"
iw dev $DEV $@ >> $FILE
i=$(($i+1))
elif [ $? -eq 1 ]
then
break
exit 0
fi
done
}

phy()
{
i=1
local i=0
local PHY=
while [ $? -eq 0 ]
do
RADIO=`uci -q get wireless.@wifi-iface[$i].device`
PHY=`uci -q get wireless.@wifi-device[$i]`
if [ $? -eq 0 ]
then
flair "$RADIO $1"
iwinfo $RADIO $1 >> $FILE
flair "phy$i $1"
iw phy phy$i $@ >> $FILE
i=$(($i+1))
elif [ $? -eq 1 ]
then
Expand Down
4 changes: 2 additions & 2 deletions luasrc/controller/commotion/debugger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function data()
f:close()
end
end
old_uri = env.REQUEST_URI
old_uri = luci.http.getenv("REQUEST_URI")
uri = string.gsub(old_uri, "debug/submit", "debug")
http.redirect("https://"..env.SERVER_NAME..uri)
http.redirect("https://"..luci.http.getenv("SERVER_NAME")..uri)
end