openwrt/package/base-files/files/lib/preinit
Olliver Schinagl 3da70c6469 base-files: Do not break on non-eth ports
When using OpenWRT with DSA and 'lan' ports, we could get an empty
`next_eth`. This is of course not desirable, as this causes `sh: out of
range` errors when trying to determine which one would be greater.

It turns out, that we don't even need this check at all because, when
looking for all existin eth*s on a system, and take the highest index
and then iterate a set of devices and rename to eth${highest_index+n},
it is guaranteed that there will be no conflict.

Fixes: b688bf83f9 ("base-files: rename ethernet devs on known boards")
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2023-05-09 22:54:38 +02:00
..
02_default_set_state treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00
02_sysinfo treewide: populate boardname and model earlier 2017-07-15 23:13:34 +02:00
10_indicate_failsafe treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00
10_indicate_preinit base-files: Do not break on non-eth ports 2023-05-09 22:54:38 +02:00
30_failsafe_wait failsafe: run on all consoles listed in /proc/cmdline 2022-06-19 12:40:30 +02:00
40_run_failsafe_hook treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00
50_indicate_regular_preinit treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00
70_initramfs_test treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00
80_mount_root base-files: add support for restoring config from tmpfs 2021-02-28 00:09:09 +00:00
99_10_failsafe_login failsafe: run on all consoles listed in /proc/cmdline 2022-06-19 12:40:30 +02:00
99_10_run_init treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00