mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-23 21:59:53 +07:00
functions: fix sortnetif for arc
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
5b40850fe0
commit
ddd7e2ccef
@ -236,11 +236,11 @@ function _sort_netif() {
|
||||
ETHLIST="${ETHLIST}${BUS} ${MAC} ${ETH}\n"
|
||||
done
|
||||
local ETHLISTTMPB="$(echo -e "${ETHLIST}" | sort)"
|
||||
local ETHLIST="$(echo -e "${ETHLISTTMPM}" | grep -v '^$')"
|
||||
local ETHLIST="$(echo -e "${ETHLISTTMPB}" | grep -v '^$')"
|
||||
local ETHSEQ="$(echo -e "${ETHLIST}" | awk '{print $3}' | sed 's/eth//g')"
|
||||
local ETHNUM="$(echo -e "${ETHLIST}" | wc -l)"
|
||||
|
||||
# echo "${ETHSEQ}"
|
||||
# echo "${ETHSEQ}" >"/tmp/ethseq"
|
||||
# sort
|
||||
if [ ! "${ETHSEQ}" = "$(seq 0 $((${ETHNUM:0} - 1)))" ]; then
|
||||
/etc/init.d/S41dhcpcd stop >/dev/null 2>&1
|
||||
|
Loading…
Reference in New Issue
Block a user