add custom scripts

pull/94/head
Anime4000 3 months ago
parent ada3a603a5
commit e63a2decb4
  1. 12
      Tools/emulator/qemu-test.sh
  2. 10
      Tools/etc/scripts/fix_speed.sh
  3. 21
      Tools/etc/scripts/fix_sw_ver.sh
  4. 26
      Tools/etc/scripts/fix_vlan_tag.sh
  5. 2212
      WebGui/Project Files/topbar.ai
  6. BIN
      WebGui/Project Files/topbar.png
  7. BIN
      WebGui/Project Files/topbar.psd

@ -121,7 +121,17 @@ rm "$CHDIR/home/httpd/web/admin/graphics/topbar.gif"
cd "$CHDIR/home/httpd/web/admin/graphics"
ln -s "../../graphics/topbar.gif" "topbar.gif"
ln -s "../../graphics/router.gif" "router.gif"
cd "$DIR/${FILENAME%.*}"
cd "$DIR/${FILENAME%.*}"
if [ -d "$DIR/custom/etc" ]; then
echo "Injecting custom or fix scripts"
cp -rf "$DIR/custom/etc" "$CHDIR/etc"
fi
if [ -f "$CHDIR/etc/scripts/fix_sw_ver.sh" ]; then
echo "Injecting software version fix scripts"
find "$CHDIR/etc/init.d" -type f -exec sed -i 's/\/etc\/insdrv.sh/\/etc\/insdrv.sh\n\/etc\/scripts\/fix_sw_ver.sh/g' {} +
fi
echo "chmod +x /bin folder, prevent stick become brick!"
chmod +x "$CHDIR/bin" -R

@ -0,0 +1,10 @@
#!/bin/sh
# HiSGMII Speed: Fix upload speed when using HiSGMII mode
# By stich86
SPEED=$(flash get LAN_SDS_MODE | awk -F'=' '{print $2}')
if [ "$SPEED" == "4" ] || [ "$SPEED" == "5" ] || [ "$SPEED" == "6" ]; then
/bin/diag bandwidth set egress port all rate 4194296
/bin/diag bandwidth set ingress port all rate 4194296
fi

@ -0,0 +1,21 @@
#!/bin/sh
# Software Version: Allow user to use custom Software Version when using ODI Stick
# By stich86, Anime4000
OLT_MODE=$(flash get OMCI_OLT_MODE | awk -F'=' '{print $2}')
SWVER0=$(/bin/nv getenv sw_custom_version0 | awk -F'=' '{print $2}')
SWVER1=$(/bin/nv getenv sw_custom_version1 | awk -F'=' '{print $2}')
# Check if custom nv value is exist
if [ -z "$SWVER0" ]; then
SWVER0=$(/bin/nv getenv sw_version0 | awk -F'=' '{print $2}')
fi
if [ -z "$SWVER1" ]; then
SWVER1=$(/bin/nv getenv sw_version1 | awk -F'=' '{print $2}')
fi
# Apply custom Software Version when using OMCI_OLT_MODE 3
if [ "$OLT_MODE" == "3" ]; then
flash set OMCI_SW_VER1 $SWVER0
flash set OMCI_SW_VER2 $SWVER1
fi

@ -0,0 +1,26 @@
#!/bin/sh
# VLAN Tag Fix: Fix VLAN wrong mapping
# By inyourgroove
set -e
while true; do
omcicli mib get 84 > /tmp/84.tmp
size=$(ls -la /tmp/ | grep 84.tmp | awk '{ print $5 }')
if [[ "$size" -lt "88" ]]; then
# Looks like the table is not populated yet
sleep 30
continue
fi
one_mode=$(awk '/0x1102/{nr[NR]; nr[NR+2]}; NR in nr' /tmp/84.tmp | grep FwdOp | awk '{ print $2 }')
two_mode=$(awk '/0x110b/{nr[NR]; nr[NR+2]}; NR in nr' /tmp/84.tmp | grep FwdOp | awk '{ print $2 }')
rm /tmp/84.tmp
[[ $one_mode != "0x02" ]] && omcicli mib set 84 4354 FwdOp 0x02
[[ $two_mode != "0x02" ]] && omcicli mib set 84 4363 FwdOp 0x02
sleep 30
done;

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.
Loading…
Cancel
Save