diff --git a/files/usr/sbin/cdh.sh b/files/usr/sbin/cdh similarity index 88% rename from files/usr/sbin/cdh.sh rename to files/usr/sbin/cdh index 9053679..193e655 100755 --- a/files/usr/sbin/cdh.sh +++ b/files/usr/sbin/cdh @@ -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() @@ -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() @@ -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 diff --git a/luasrc/controller/commotion/debugger.lua b/luasrc/controller/commotion/debugger.lua index 59a1471..ad64fca 100644 --- a/luasrc/controller/commotion/debugger.lua +++ b/luasrc/controller/commotion/debugger.lua @@ -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