forked from freifunk-franken/firmware
Adrian Schmutzler
93cebbf3f7
This new packages is meant to serve as meta-package to store setup for simple-tc. This achieves two objectives: - Increase general maintainability by having relevant code in one location. - Provide the option to include/exclude simple-tc functionality just by selecting/deselecting the fff-simple-tc package. This will allow for easier testing of image size impact of this functionality, too. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Acked-by: Christian Dresel <fff@chrisi01.de> Reviewed-by: Fabian Bläse <fabian@blaese.de>
23 lines
654 B
Bash
23 lines
654 B
Bash
#!/bin/sh
|
|
# Copyright 2017 Adrian Schmutzler
|
|
# License GPLv3
|
|
|
|
touch /etc/config/fff
|
|
|
|
if ! uci -q get fff.system > /dev/null ; then
|
|
uci set fff.system=fff
|
|
uci set "fff.system.hostname=FFF"
|
|
uci commit fff
|
|
fi
|
|
|
|
FFF_hostname=$(uci -q get "fff.system.hostname")
|
|
test -n "${FFF_hostname}" && uci -q set "system.@system[0].hostname=${FFF_hostname}"
|
|
test -n "${FFF_hostname}" && echo "${FFF_hostname}" > /proc/sys/kernel/hostname
|
|
|
|
uci commit system
|
|
|
|
poe_passthrough=$(uci -q get "fff.poe_passthrough.active")
|
|
if [ "$poe_passthrough" = "1" ] && [ -s /usr/lib/fff-support/activate_poe_passthrough.sh ] ; then
|
|
/usr/lib/fff-support/activate_poe_passthrough.sh
|
|
fi
|