firmware/src/packages/fff/fff-config/files/etc/uci-defaults/98-configure-fff
Adrian Schmutzler 858930547b treewide: use SPDX license identifiers
The SPDX license identifier provides a standardized way for specifying
licenses that is both human- and machine-readable. It is used upstream
both in OpenWrt and the Linux kernel.

Replace licenses in our repository by those identifiers.

The full-text licenses corresponding to these identifiers are
provided in the LICENSES folder.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Fabian Bläse <fabian@blaese.de>
2021-03-06 18:53:26 +01:00

25 lines
678 B
Plaintext

# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright 2017 Adrian Schmutzler
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
exit 0