aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/base-files/Makefile2
-rw-r--r--package/base-files/files/lib/functions/migrations.sh23
2 files changed, 24 insertions, 1 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index db9be216e6..3cb3d2034a 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk
include $(INCLUDE_DIR)/feeds.mk
PKG_NAME:=base-files
-PKG_RELEASE:=230
+PKG_RELEASE:=231
PKG_FLAGS:=nonshared
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
diff --git a/package/base-files/files/lib/functions/migrations.sh b/package/base-files/files/lib/functions/migrations.sh
index b180a0242f..da10d2be5a 100644
--- a/package/base-files/files/lib/functions/migrations.sh
+++ b/package/base-files/files/lib/functions/migrations.sh
@@ -28,11 +28,34 @@ migrate_led_sysfs() {
done;
}
+remove_devicename_led_sysfs() {
+ local cfg="$1"
+ local sysfs
+ local name
+ local new_sysfs
+
+ config_get sysfs ${cfg} sysfs
+ config_get name ${cfg} name
+
+ echo "${sysfs}" | grep -q ":.*:" || return
+
+ new_sysfs=$(echo ${sysfs} | sed "s/^[^:]*://")
+
+ uci set system.${cfg}.sysfs="${new_sysfs}"
+
+ logger -t led-migration "sysfs option of LED \"${name}\" updated to ${new_sysfs}"
+}
+
migrate_leds() {
config_load system
config_foreach migrate_led_sysfs led "$@"
}
+remove_devicename_leds() {
+ config_load system
+ config_foreach remove_devicename_led_sysfs led
+}
+
migrations_apply() {
local realm="$1"
[ -n "$(uci changes ${realm})" ] && uci -q commit ${realm}