|
11 | 11 | # 2. If $(pwd)/proxy-target.txt exists, it means this is a proxy host, and the |
12 | 12 | # real build machine is on the host specified by the login details inside |
13 | 13 | # that file. If the file does not exist, we are on the build slave itself. |
14 | | -# After figuring that stuff out, this script will run either on_proxy() or |
15 | | -# the rest of the original script that sourced this file, depending on |
| 14 | +# After figuring that stuff out, the script will run the rest of the original |
| 15 | +# script that sources this file, depending on |
16 | 16 | # whether we are on the proxy or build host, respectively. Note that commands |
17 | 17 | # that are specified *before* this script is sourced will run on both hosts, |
18 | | -# so make sure this is sourced early, but after on_proxy() is defined. |
| 18 | +# so make sure this is sourced early. |
19 | 19 | # |
20 | 20 | # The script is expected to be sourced early in the init-script phase after |
21 | 21 | # provisioning. |
@@ -275,15 +275,6 @@ reset_nested_vm() { |
275 | 275 |
|
276 | 276 | if [ -f $(pwd)/proxy-target.txt ] |
277 | 277 | then |
278 | | - ret=0 |
279 | | - on_proxy || ret=$? |
280 | | - # Failure to find a function returns 127, so check for that specifically, |
281 | | - # otherwise there was an error inside the function. |
282 | | - if [ $ret -ne 0 -a $ret -ne 127 ] |
283 | | - then |
284 | | - exit $ret |
285 | | - fi |
286 | | - |
287 | 278 | # -------------------------------------------------------------------------- |
288 | 279 | # Check target machine health. |
289 | 280 | # -------------------------------------------------------------------------- |
@@ -424,17 +415,6 @@ then |
424 | 415 | exit $ret |
425 | 416 | elif [ -z "$INIT_BUILD_HOST_SUB_INVOKATION" ] |
426 | 417 | then |
427 | | - # Add build-artifacts-cache to known hosts |
428 | | - KNOWN_HOSTS_FILE=~/.ssh/known_hosts |
429 | | - # if fgrep build-artifacts-cache.cloud.cfengine.com $KNOWN_HOSTS_FILE 2>/dev/null |
430 | | - # then |
431 | | - # : |
432 | | - # else |
433 | | - echo "build-artifacts-cache.cloud.cfengine.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6qcxCQgtubv9WEhrAyMEFFMLLEjirk0p0Ru+vATioEIyw7gBFfOWOp/dBfsF6fuiY1vt3IsBx4u1DkS4j8x7DjB8X2dIcBia2jt2D3sBdDFb/nc7ZnWfFf/E7dWoiF0WKvxZ62RwjyZuyz9TmL1d3jlIyuRimkhgwnuRAMyymJ5YbxvvfTH01OuGS/0pkqkLAxomRyJTv6qcGr1rOPd5FuySwOO5M/tGkajJppKC+8u/RCyWfgu1khrBmi6PevXTaoJ/lQyexexZK0HVsA5G1U/+ipO18DqaCCAnHvZ/AKt+yYmoe9RtLfx0T7DHinEV1yj4ynUj7EqudCrLOorg5 root@yoctobuild-sstate-cache" > $KNOWN_HOSTS_FILE |
434 | | - # add openssl 3.x compatible host key as well |
435 | | - echo "build-artifacts-cache.cloud.cfengine.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINMJKl282VQSz4EMMypJjATu21A9SxQA1XoTslIOID16 root@yoctobuild-sstate-cache" >> $KNOWN_HOSTS_FILE |
436 | | - # fi |
437 | | - |
438 | 418 | # Reexecute script in order to be able to collect the return code, and |
439 | 419 | # potentially stop the slave. |
440 | 420 | rsync -czt "$0" $HOME/commands.sh |
|
0 commit comments