diff --git a/hap-ac2-init.rsc b/hap-ac2-init.rsc index 2747a96..48c5ed1 100644 --- a/hap-ac2-init.rsc +++ b/hap-ac2-init.rsc @@ -60,8 +60,10 @@ # install public SSH key :put "Configuring SSH..."; -/tool fetch https://launchpad.net/~pothi/+sshkeys dst-path=pothi-ssh-key-rsa; -:delay 5s; +{ + :local result [ /tool fetch https://launchpad.net/~pothi/+sshkeys dst-path=pothi-ssh-key-rsa as-value]; + :do { :delay 2s } while=( $result->"status" != "finished" ) +} /user ssh-keys import public-key-file=pothi-ssh-key-rsa; /file remove pothi-ssh-key-rsa; diff --git a/sxt-lte-init.rsc b/sxt-lte-init.rsc index 5d463e5..ba3b31b 100644 --- a/sxt-lte-init.rsc +++ b/sxt-lte-init.rsc @@ -44,8 +44,10 @@ # Wireless tweaks # install public SSH key -/tool fetch https://launchpad.net/~pothi/+sshkeys dst-path=pothi-ssh-key-rsa; -:delay 5s; +{ + :local result [ /tool fetch https://launchpad.net/~pothi/+sshkeys dst-path=pothi-ssh-key-rsa as-value]; + :while ($result->"status" != "finished") do={ :delay 2s } +} /user ssh-keys import public-key-file=pothi-ssh-key-rsa; /file remove pothi-ssh-key-rsa;