ramips: split further base-files across subtargets
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Mon, 11 Nov 2019 13:48:17 +0000 (14:48 +0100)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Mon, 11 Nov 2019 13:53:06 +0000 (14:53 +0100)
As started in 19724e28c81e ("ramips: split base-files into
subtargets"), this moves some smaller left-over files to the
appropriate base-files folder of their subtarget:

- /etc/init.d/bootcount
- /etc/uci-defaults/04_led_migration

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/ramips/base-files/etc/init.d/bootcount [deleted file]
target/linux/ramips/base-files/etc/uci-defaults/04_led_migration [deleted file]
target/linux/ramips/mt7620/base-files/etc/uci-defaults/04_led_migration [new file with mode: 0644]
target/linux/ramips/mt7621/base-files/etc/init.d/bootcount [new file with mode: 0755]
target/linux/ramips/mt7621/base-files/etc/uci-defaults/04_led_migration [new file with mode: 0644]
target/linux/ramips/mt76x8/base-files/etc/init.d/bootcount [new file with mode: 0755]
target/linux/ramips/mt76x8/base-files/etc/uci-defaults/04_led_migration [new file with mode: 0644]
target/linux/ramips/rt305x/base-files/etc/uci-defaults/04_led_migration [new file with mode: 0644]

diff --git a/target/linux/ramips/base-files/etc/init.d/bootcount b/target/linux/ramips/base-files/etc/init.d/bootcount
deleted file mode 100755 (executable)
index ad3dd97..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh /etc/rc.common
-
-START=99
-
-boot() {
-       case $(board_name) in
-       samknows,whitebox-v8)
-               fw_setenv bootcount 0
-               ;;
-       xiaomi,miwifi-nano)
-               fw_setenv flag_boot_success 1
-               ;;
-       esac
-}
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/04_led_migration b/target/linux/ramips/base-files/etc/uci-defaults/04_led_migration
deleted file mode 100644 (file)
index e84d023..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-
-. /lib/functions.sh
-. /lib/functions/migrations.sh
-
-board=$(board_name)
-
-case "$board" in
-fon,fonera-20n)
-       migrate_leds "^fonera20n:=fonera-20n:"
-       ;;
-intenso,memory2move)
-       migrate_leds "^m2m:=memory2move:"
-       ;;
-lenovo,newifi-y1)
-       migrate_leds "^y1:=newifi-y1:"
-       ;;
-lenovo,newifi-y1s)
-       migrate_leds "^y1s:=newifi-y1s:"
-       ;;
-netgear,wn3000rp-v3)
-       migrate_leds "^wn3000rpv3:=wn3000rp-v3:"
-       ;;
-netgear,wndr3700-v5)
-       migrate_leds "^wndr3700v5:=wndr3700-v5:"
-       ;;
-tplink,archer-c2-v1)
-       migrate_leds "^c2-v1:=archer-c2-v1:"
-       ;;
-tplink,archer-c20-v1)
-       migrate_leds "^c20-v1:=archer-c20-v1:"
-       ;;
-tplink,archer-c20-v4)
-       migrate_leds "^c20-v4:=archer-c20-v4:"
-       ;;
-tplink,archer-c20i)
-       migrate_leds "^c20i:=archer-c20i:"
-       ;;
-tplink,archer-c50-v1)
-       migrate_leds "^c50:=archer-c50-v1:"
-       ;;
-tplink,archer-c50-v3)
-       migrate_leds "^c50-v3:=archer-c50-v3:"
-       ;;
-tplink,archer-c50-v4)
-       migrate_leds "^c50-v4:=archer-c50-v4:"
-       ;;
-tplink,archer-mr200)
-       migrate_leds "^mr200:=archer-mr200:"
-       ;;
-youku,yk1)
-       migrate_leds "^youku-yk1:=yk1:"
-       ;;
-zyxel,keenetic-omni)
-       migrate_leds "^kn_rc:=keenetic-omni:"
-       ;;
-zyxel,keenetic-omni-ii)
-       migrate_leds "^kn_rc:=keenetic-omni-ii:"
-       ;;
-zyxel,keenetic-viva)
-       migrate_leds "^kng_rc:=keenetic-viva:"
-       ;;
-esac
-
-migrations_apply system
-
-exit 0
diff --git a/target/linux/ramips/mt7620/base-files/etc/uci-defaults/04_led_migration b/target/linux/ramips/mt7620/base-files/etc/uci-defaults/04_led_migration
new file mode 100644 (file)
index 0000000..ba1a0df
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+. /lib/functions.sh
+. /lib/functions/migrations.sh
+
+board=$(board_name)
+
+case "$board" in
+lenovo,newifi-y1)
+       migrate_leds "^y1:=newifi-y1:"
+       ;;
+lenovo,newifi-y1s)
+       migrate_leds "^y1s:=newifi-y1s:"
+       ;;
+netgear,wn3000rp-v3)
+       migrate_leds "^wn3000rpv3:=wn3000rp-v3:"
+       ;;
+tplink,archer-c2-v1)
+       migrate_leds "^c2-v1:=archer-c2-v1:"
+       ;;
+tplink,archer-c20-v1)
+       migrate_leds "^c20-v1:=archer-c20-v1:"
+       ;;
+tplink,archer-c20i)
+       migrate_leds "^c20i:=archer-c20i:"
+       ;;
+tplink,archer-c50-v1)
+       migrate_leds "^c50:=archer-c50-v1:"
+       ;;
+tplink,archer-mr200)
+       migrate_leds "^mr200:=archer-mr200:"
+       ;;
+youku,yk1)
+       migrate_leds "^youku-yk1:=yk1:"
+       ;;
+zyxel,keenetic-omni)
+       migrate_leds "^kn_rc:=keenetic-omni:"
+       ;;
+zyxel,keenetic-omni-ii)
+       migrate_leds "^kn_rc:=keenetic-omni-ii:"
+       ;;
+zyxel,keenetic-viva)
+       migrate_leds "^kng_rc:=keenetic-viva:"
+       ;;
+esac
+
+migrations_apply system
+
+exit 0
diff --git a/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount b/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount
new file mode 100755 (executable)
index 0000000..807801a
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+
+boot() {
+       case $(board_name) in
+       samknows,whitebox-v8)
+               fw_setenv bootcount 0
+               ;;
+       esac
+}
diff --git a/target/linux/ramips/mt7621/base-files/etc/uci-defaults/04_led_migration b/target/linux/ramips/mt7621/base-files/etc/uci-defaults/04_led_migration
new file mode 100644 (file)
index 0000000..e745c2c
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+. /lib/functions.sh
+. /lib/functions/migrations.sh
+
+board=$(board_name)
+
+case "$board" in
+netgear,wndr3700-v5)
+       migrate_leds "^wndr3700v5:=wndr3700-v5:"
+       ;;
+esac
+
+migrations_apply system
+
+exit 0
diff --git a/target/linux/ramips/mt76x8/base-files/etc/init.d/bootcount b/target/linux/ramips/mt76x8/base-files/etc/init.d/bootcount
new file mode 100755 (executable)
index 0000000..0d64deb
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+
+boot() {
+       case $(board_name) in
+       xiaomi,miwifi-nano)
+               fw_setenv flag_boot_success 1
+               ;;
+       esac
+}
diff --git a/target/linux/ramips/mt76x8/base-files/etc/uci-defaults/04_led_migration b/target/linux/ramips/mt76x8/base-files/etc/uci-defaults/04_led_migration
new file mode 100644 (file)
index 0000000..3f9f615
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+. /lib/functions.sh
+. /lib/functions/migrations.sh
+
+board=$(board_name)
+
+case "$board" in
+tplink,archer-c20-v4)
+       migrate_leds "^c20-v4:=archer-c20-v4:"
+       ;;
+tplink,archer-c50-v3)
+       migrate_leds "^c50-v3:=archer-c50-v3:"
+       ;;
+tplink,archer-c50-v4)
+       migrate_leds "^c50-v4:=archer-c50-v4:"
+       ;;
+esac
+
+migrations_apply system
+
+exit 0
diff --git a/target/linux/ramips/rt305x/base-files/etc/uci-defaults/04_led_migration b/target/linux/ramips/rt305x/base-files/etc/uci-defaults/04_led_migration
new file mode 100644 (file)
index 0000000..b1a94bf
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+. /lib/functions.sh
+. /lib/functions/migrations.sh
+
+board=$(board_name)
+
+case "$board" in
+fon,fonera-20n)
+       migrate_leds "^fonera20n:=fonera-20n:"
+       ;;
+intenso,memory2move)
+       migrate_leds "^m2m:=memory2move:"
+       ;;
+esac
+
+migrations_apply system
+
+exit 0