This commit is contained in:
edwin 2023-03-29 15:23:44 -04:00
parent b83446f10f
commit bc896baa03

View file

@ -463,11 +463,12 @@ if [ "$(get_device_mode)" = "ramdisk" ]; then
_kill_if_running iproxy _kill_if_running iproxy
echo "[*] Rebooting device in SSH Ramdisk" echo "[*] Rebooting device in SSH Ramdisk"
if [ "$os" = 'Linux' ]; then if [ "$os" = 'Linux' ]; then
sudo "$dir"/iproxy 2222 22 & sudo "$dir"/iproxy 6413 22 >/dev/null &
else else
"$dir"/iproxy 2222 22 & "$dir"/iproxy 6413 22 >/dev/null &
fi fi
sleep 1 sleep 2
remote_cmd "/usr/sbin/nvram auto-boot=false"
remote_cmd "/sbin/reboot" remote_cmd "/sbin/reboot"
_kill_if_running iproxy _kill_if_running iproxy
_wait recovery _wait recovery
@ -578,9 +579,9 @@ if [ true ]; then
# Execute the commands once the rd is booted # Execute the commands once the rd is booted
if [ "$os" = 'Linux' ]; then if [ "$os" = 'Linux' ]; then
sudo "$dir"/iproxy 2222 22 & sudo "$dir"/iproxy 6413 22 >/dev/null &
else else
"$dir"/iproxy 2222 22 & "$dir"/iproxy 6413 22 >/dev/null &
fi fi
if ! ("$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "echo connected" &> /dev/null); then if ! ("$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "echo connected" &> /dev/null); then