@@ -152,18 +152,23 @@ async fn tplink_run_install(
152
152
// there is too little space on the internal flash to store anything, but the initrd script
153
153
// expects things to be at this location
154
154
telnet_send_command ( addr, "rm -rf /data/rayhunter" , "exit code 0" , true ) . await ?;
155
- telnet_send_command ( addr, "mkdir -p /data" , "exit code 0" , true ) . await ?;
156
- telnet_send_command (
157
- addr,
158
- & format ! ( "ln -sf {sdcard_path} /data/rayhunter" ) ,
159
- "exit code 0" ,
160
- true ,
161
- )
162
- . await ?;
155
+
156
+ if skip_sdcard {
157
+ telnet_send_command ( addr, "mkdir -p /data/rayhunter" , "exit code 0" , true ) . await ?;
158
+ } else {
159
+ telnet_send_command ( addr, "mkdir -p /data" , "exit code 0" , true ) . await ?;
160
+ telnet_send_command (
161
+ addr,
162
+ & format ! ( "ln -sf {sdcard_path} /data/rayhunter" ) ,
163
+ "exit code 0" ,
164
+ true ,
165
+ )
166
+ . await ?;
167
+ }
163
168
164
169
telnet_send_file (
165
170
addr,
166
- & format ! ( "{sdcard_path} /config.toml" ) ,
171
+ & format ! ( "/data/rayhunter /config.toml" ) ,
167
172
crate :: CONFIG_TOML
168
173
. replace ( "#device = \" orbic\" " , "device = \" tplink\" " )
169
174
. as_bytes ( ) ,
@@ -175,7 +180,7 @@ async fn tplink_run_install(
175
180
176
181
telnet_send_file (
177
182
addr,
178
- & format ! ( "{sdcard_path} /rayhunter-daemon" ) ,
183
+ & format ! ( "/data/rayhunter /rayhunter-daemon" ) ,
179
184
rayhunter_daemon_bin,
180
185
true ,
181
186
)
@@ -191,7 +196,7 @@ async fn tplink_run_install(
191
196
192
197
telnet_send_command (
193
198
addr,
194
- & format ! ( "chmod ugo+x {sdcard_path} /rayhunter-daemon" ) ,
199
+ & format ! ( "chmod ugo+x /data/rayhunter /rayhunter-daemon" ) ,
195
200
"exit code 0" ,
196
201
true ,
197
202
)
0 commit comments