File tree Expand file tree Collapse file tree 8 files changed +23
-64
lines changed Expand file tree Collapse file tree 8 files changed +23
-64
lines changed Original file line number Diff line number Diff line change 1- src/radxa-* /usr/sbin
1+ src/radxa-otgutils /usr/sbin
22man/*.8 /usr/share/man/man8
Original file line number Diff line number Diff line change @@ -5,9 +5,9 @@ After=network.target
55
66[Service]
77RemainAfterExit =yes
8- ExecStart =/usr/sbin/radxa-adbd start
9- ExecStop =/usr/sbin/radxa-adbd stop
10- ExecReload =/usr/sbin/radxa-adbd reload
8+ ExecStart =/usr/sbin/radxa-otgutils adbd start
9+ ExecStop =/usr/sbin/radxa-otgutils adbd stop
10+ ExecReload =/usr/sbin/radxa-otgutils adbd reload
1111
1212[Install]
1313WantedBy =multi-user.target
Original file line number Diff line number Diff line change @@ -5,9 +5,9 @@ After=network.target
55
66[Service]
77RemainAfterExit =yes
8- ExecStart =/usr/sbin/radxa-usbnet start
9- ExecStop =/usr/sbin/radxa-usbnet stop
10- ExecReload =/usr/sbin/radxa-usbnet reload
8+ ExecStart =/usr/sbin/radxa-otgutils usbnet start
9+ ExecStop =/usr/sbin/radxa-otgutils usbnet stop
10+ ExecReload =/usr/sbin/radxa-otgutils usbnet reload
1111
1212[Install]
1313WantedBy =multi-user.target
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -114,41 +114,29 @@ stop()
114114}
115115
116116MODE=
117- case " $( basename " $0 " ) " in
118- radxa-adbd)
119- if ! command -v adbd
120- then
121- echo " Did not find adbd. Please check if related packages are installed."
122- exit 1
123- fi
124- MODE=adbd
125- ;;
126- radxa-usbnet)
127- MODE=usbnet
128- ;;
129- radxa-otgutils)
130- echo Please run this script from symbolic links.
131- exit 1
117+ case " $1 " in
118+ adbd|usbnet)
119+ MODE=" $1 "
132120 ;;
133121 * )
134- echo Unknown script name.
122+ echo " Unknown mode. Valid values are adbd or usbnet. "
135123 exit 1
136124 ;;
137125esac
138126
139- case " $1 " in
140- start)
141- start
142- ;;
143- stop)
144- stop
145- ;;
146- restart|reload)
147- stop
148- start
149- ;;
127+ case " $2 " in
128+ start)
129+ start
130+ ;;
131+ stop)
132+ stop
133+ ;;
134+ restart|reload)
135+ stop
136+ start
137+ ;;
150138* )
151- echo " Usage: $0 { start|stop|restart} "
139+ echo " Usage: $0 <adbd|usbnet> < start|stop|restart> "
152140 exit 1
153141esac
154142
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments