Login  Register

Re: Hotfix 160301 - BETA ONLY

Posted by hans2 on Mar 08, 2016; 4:48pm
URL: https://itus.accessinnov.com/Hotfix-160301-FINAL-tp157p344.html

Roadrunnere42 wrote
Hans

here is want you what to find out which node the shield is in

if  [ `df -h | grep -m1 mmcblk* | awk '{ print sunstr( $0, 6, 14 )  }'` ]: then
DISK_PARTITION=`df -h | grep -m1 mmcblk* | awk '{ print substr( $0, 6, 14 ) }'`
if [ $DISK_PARTITION = mmcblk0p2 ]; then
SHEILD_MODE=Router
elif if [ $DISK_PARTITION = mmcblk0p3 ]; then
SHEILD_MODE=Gateway
elif [ $DISK_PARTITION = mmcblk0p4 ]; then
SHEILD_MODE=Bridge

else
echo "Shield operation error"
fi

roadrunnere42
Awesome. What I will probably do is save the output in a .mode file and have LuCI pull the contents.

That means an update to /usr/lib/lua/luci/view/admin_status/index.htm

Where should I put this script - in /etc/rc.local so that it runs once during startup?
No more: Shield Pro v1, Chaos Calmer, FW 1.51 SP1