diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-07-17 12:09:57 +0200 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-07-17 12:14:32 +0200 |
commit | b78a266888aad6632ccc9eecb04e615f9ce43868 (patch) | |
tree | 86e13e0843a40edddb527f50d4b51c544bf0b7f6 /target/linux/lantiq/xway_legacy/base-files | |
parent | 6299c1760a15633a3b41f08044efd9cadd051db0 (diff) | |
download | upstream-b78a266888aad6632ccc9eecb04e615f9ce43868.tar.gz upstream-b78a266888aad6632ccc9eecb04e615f9ce43868.tar.bz2 upstream-b78a266888aad6632ccc9eecb04e615f9ce43868.zip |
lantiq: move 01_led_migration script to subtargets
Split the /etc/uci-defaults/01_led_migration scripts into subtargets
as already done for most of the other base-files.
While this introduces a minor amount of code duplication, it still
is considered an improvement, as device-specific settings are kept
together in the subtargets' base-files and the script at hand can be
removed entirely for two of the subtargets not needing it.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/lantiq/xway_legacy/base-files')
-rw-r--r-- | target/linux/lantiq/xway_legacy/base-files/etc/uci-defaults/01_led_migration | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/target/linux/lantiq/xway_legacy/base-files/etc/uci-defaults/01_led_migration b/target/linux/lantiq/xway_legacy/base-files/etc/uci-defaults/01_led_migration new file mode 100644 index 0000000000..18bf6a3f96 --- /dev/null +++ b/target/linux/lantiq/xway_legacy/base-files/etc/uci-defaults/01_led_migration @@ -0,0 +1,28 @@ +# +# Copyright (C) 2013 OpenWrt.org +# + +. /lib/functions/migrations.sh + +do_internet_led_rename() +{ + config_load system + + [ -n $(config_get led_internet name) ] || return + [ -z $(config_get led_dsl name) ] || return + + uci rename system.led_internet=led_dsl + uci set system.led_dsl.name=dsl + + logger -t led-migration "internet led renamed to dsl" +} + +case "$(board_name)" in +arcadyan,arv452cqw) + do_internet_led_rename + ;; +esac + +migrations_apply system + +exit 0 |