Given that the existing default button handler didn't actually do
anything, I think it furthers the argument that they can just be
dropped entirely.

Jo-Philipp Wich <j...@mein.io> wrote:
> Register button actions through board.d and drop corresponding
> config sections from the /etc/config/system template.
> 
> Also rename `01_leds` to `01_system` now that it is doing more
> than just adding an led entry.
> 
> Signed-off-by: Jo-Philipp Wich <j...@mein.io>
> 
>  delete mode 100755 target/linux/ath25/base-files/etc/board.d/01_leds
>  create mode 100755 target/linux/ath25/base-files/etc/board.d/01_system
> 
> diff --git a/target/linux/ath25/base-files/etc/board.d/01_leds
> b/target/linux/ath25/base-files/etc/board.d/01_leds deleted
> file mode 100755 index e6ab4a7..0000000
> --- a/target/linux/ath25/base-files/etc/board.d/01_leds
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -#!/bin/sh
> -# Copyright 2012-2015 OpenWrt.org
> -#
> -
> -. /lib/functions/uci-defaults.sh
> -
> -board_config_update
> -
> -ucidef_set_led_netdev "wlan" "wlan" "wlan" "wlan0"
> -
> -board_config_flush
> -
> -exit 0
> diff --git
> a/target/linux/ath25/base-files/etc/board.d/01_system
> b/target/linux/ath25/base-files/etc/board.d/01_system new file
> mode 100755 index 0000000..eac16b5
> --- /dev/null
> +++ b/target/linux/ath25/base-files/etc/board.d/01_system
> @@ -0,0 +1,16 @@
> +#!/bin/sh
> +# Copyright 2012-2015 OpenWrt.org
> +#
> +
> +. /lib/functions/uci-defaults.sh
> +
> +board_config_update
> +
> +ucidef_set_led_netdev "wlan" "wlan" "wlan" "wlan0"
> +
> +ucidef_add_button "shortreset" "reset" "released" "logger
> reboot" "0" "4" +ucidef_add_button "longreset" "reset"
> "released" "logger factory default" "5" "30"
> +
> +board_config_flush
> +
> +exit 0
> diff --git a/target/linux/ath25/base-files/etc/config/system
> b/target/linux/ath25/base-files/etc/config/system index
> 1d29ad8..0834b52 100644
> --- a/target/linux/ath25/base-files/etc/config/system
> +++ b/target/linux/ath25/base-files/etc/config/system
> @@ -7,17 +7,3 @@ config timeserver ntp
>       list server     1.openwrt.pool.ntp.org
>       list server     2.openwrt.pool.ntp.org
>       list server     3.openwrt.pool.ntp.org
> -
> -config button
> -     option button   reset
> -     option action   released
> -     option handler  "logger reboot"
> -     option min              0
> -     option max              4
> -
> -config button
> -     option button   reset
> -     option action   released
> -     option handler  "logger factory default"
> -     option min              5
> -     option max              30
> -- 
> 2.1.4
> 
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev

Attachment: signature.asc
Description: OpenPGP Digital Signature

_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to