blob: 787dd2e3ab420fc5c00c610bd33b26359b75a2b4 [file] [log] [blame]
developer3abe1ad2022-01-24 11:13:32 +08001#!/bin/ash
2# This script is used for wrapping atenl daemon to ated
3
4# 0 is normal mode, 1 is used for specific commands
5mode="0"
6add_quote="0"
7cmd="atenl"
8
9for i in "$@"
10do
11 if [ "$i" = "-c" ]; then
12 cmd="${cmd} -c"
13 mode="1"
14 add_quote="1"
15 elif [ "${add_quote}" = "1" ]; then
16 cmd="${cmd} \"${i}\""
17 add_quote="0"
18 else
developer9b7cdad2022-03-10 14:24:55 +080019 if [ ${i} = "ra0" ]; then
20 i="phy0"
21 elif [ ${i} = "rax0" ]; then
22 i="phy1"
23 fi
developer3abe1ad2022-01-24 11:13:32 +080024 cmd="${cmd} ${i}"
25 fi
26done
27
28if [ "$mode" = "0" ]; then
29 killall atenl
30fi
31
32eval "${cmd}"