You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: udroid/src/udroid.sh
+16-16Lines changed: 16 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -426,21 +426,7 @@ login() {
426
426
foriin"$@";do
427
427
shell_command_args+=("'$i'")
428
428
done
429
-
430
-
# run_script
431
-
if [ -n"$run_script" ];then
432
-
if [ -f"$run_script" ];then
433
-
LOG "login() => run-script defined: ignoring command line arguments"
434
-
chmod +x "$run_script"
435
-
cp "$run_script""${root_fs_path}/tmp/"
436
-
run_script="/tmp/$(basename "$run_script")"
437
-
shell_command_args=("/tmp/$run_script")
438
-
else
439
-
ELOG "ERROR: run-script '$run_script' not found!"
440
-
exit 1
441
-
fi
442
-
fi
443
-
429
+
444
430
if stat "${root_fs_path}/bin/su">/dev/null 2>&1;then
445
431
set -- "/bin/su""-l""$login_user""-c""${shell_command_args[*]}"
446
432
else
@@ -455,7 +441,21 @@ login() {
455
441
fi
456
442
else
457
443
if stat "${root_fs_path}/bin/su">/dev/null 2>&1;then
458
-
set -- "/bin/su""-l""$login_user"
444
+
# run_script
445
+
if [ -n"$run_script" ];then
446
+
if [ -f"$run_script" ];then
447
+
LOG "login() => run-script defined.."
448
+
chmod +x "$run_script"
449
+
cp "$run_script""${root_fs_path}/tmp/"
450
+
run_script="/tmp/$(basename "$run_script")"
451
+
set -- "/bin/su""-l""$login_user""-c""$run_script"
452
+
else
453
+
ELOG "ERROR: run-script '$run_script' not found!"
454
+
exit 1
455
+
fi
456
+
else
457
+
set -- "/bin/su""-l""$login_user"
458
+
fi
459
459
else
460
460
GWARN "Warning: no /bin/su available in rootfs! You may need to install package 'util-linux' or 'shadow' (shadow-utils) or equivalent, depending on distribution."
0 commit comments