Just to transport the idea what I'm thinking of: take set_wifi_led as an example. Imagine the function was built like this:
> set_wifi_led() { > case $# in > 1|\ > 2) > ucidef_set_led_netdev "wifi_led" "wifi" "${1}" > "${2:-wlan0}" > ;; > 4) > ucidef_set_led_netdev "${1}" "${2}" "${3}" "${4}" > ;; > *) > echo "Something went wrong" > ;; > esac > } Then we'd have a single function capable of all LED configurations and could replace the (wild?) mix of different function calls in the 01_leds file. However, the question that arises for me: why not directly put this functionality in ucidef_set_led_usbdev ? No more need to maintain different (local) functions for each platform. Best regards, P. Wassi _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev