summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-11-22 15:40:06 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2024-11-22 15:40:06 -0500
commit5ba2855922e53cfd813709ec9dbb00b222768ca7 (patch)
tree5d41b9957e1a01081f44aca8d723539adfe16845
parent60903a87ea92b5cc9bdf95d86282dcbf8549f858 (diff)
Don't fail to launch if no ssh key
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rwxr-xr-xlib/testrunner7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/testrunner b/lib/testrunner
index fae4c85..6cdbbc7 100755
--- a/lib/testrunner
+++ b/lib/testrunner
@@ -30,8 +30,11 @@ ktest_no_cleanup_tmpdir=1
log_verbose "Testrunner starting"
mkdir -p /root/.ssh
-cat /host/$home/.ssh/id*.pub > /root/.ssh/authorized_keys
-chmod 600 /root/.ssh/authorized_keys
+if cat /host/$home/.ssh/id*.pub > /root/.ssh/authorized_keys; then
+ chmod 600 /root/.ssh/authorized_keys || true
+else
+ echo "Create an ssh key for ssh access"
+fi
mkdir -p /lib/modules
ln -s /host/$ktest_kernel_binary/lib/modules/* /lib/modules