-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fff-support: Update PoE passthrough code
This implements an upgrade safe solution for the PoE passthrough on multiple devices. Since LEDE already provides the relevant settings, a check whether those are in place enables both identification of affected devices and automatic deactivation if parameters are changed. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Reviewed-by: Tim Niemeyer <tim@tn-x.org>
- Loading branch information
Showing
6 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/packages/fff/fff-support/ar71xx/usr/lib/fff-support/activate_poe_passthrough.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
# This enables PoE passthrough so it is persistent through reboots, | ||
# but reset after firmware upgrade | ||
|
||
if uci -q get "system.poe_passthrough" > /dev/null ; then | ||
uci -q set "system.poe_passthrough.value=1" | ||
uci -q commit system | ||
/etc/init.d/gpio_switch restart | ||
fi |
5 changes: 0 additions & 5 deletions
5
src/packages/fff/fff-support/ar71xx/usr/lib/fff-support/cpe210_activate_poe_passthrough.sh
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
src/packages/fff/fff-support/ar71xx/usr/lib/fff-support/disable_poe_passthrough.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
# This disables PoE passthrough permanently | ||
|
||
uci -q set "fff.poe_passthrough=fff" | ||
uci -q set "fff.poe_passthrough.active=0" | ||
uci -q commit fff | ||
|
||
if uci -q get "system.poe_passthrough" > /dev/null ; then | ||
uci -q set "system.poe_passthrough.value=0" | ||
uci -q commit system | ||
/etc/init.d/gpio_switch restart | ||
fi |
9 changes: 9 additions & 0 deletions
9
src/packages/fff/fff-support/ar71xx/usr/lib/fff-support/permanent_poe_passthrough.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
# This enables PoE passthrough permanently, so it is persistent | ||
# during firmware upgrades | ||
|
||
uci -q set "fff.poe_passthrough=fff" | ||
uci -q set "fff.poe_passthrough.active=1" | ||
uci -q commit fff | ||
|
||
/usr/lib/fff-support/activate_poe_passthrough.sh |