|
1 | 1 | #!/bin/bash
|
2 | 2 | # Copyright (c) 2014 The CoreOS Authors.
|
| 3 | +# Copyright (c) 2023 The Flatcar Maintainers. |
3 | 4 | # Use of this source code is governed by a BSD-style license that can be
|
4 | 5 | # found in the LICENSE file.
|
5 | 6 |
|
@@ -294,36 +295,6 @@ if [[ -z "${LDSO}" ]]; then
|
294 | 295 | fi
|
295 | 296 | LIBS="${LDSO%/*}"
|
296 | 297 |
|
297 |
| -# Use torcx binary from next-OS image to ensure compatibility |
298 |
| -TORCX_BIN="" |
299 |
| -for bindir in bin/old_bins bin sbin lib/coreos; do |
300 |
| - if [[ -x "${INSTALL_MNT}/${bindir}/torcx" ]]; then |
301 |
| - TORCX_BIN="${INSTALL_MNT}/${bindir}/torcx" |
302 |
| - break |
303 |
| - fi |
304 |
| -done |
305 |
| -if [[ -z "${TORCX_BIN}" ]]; then |
306 |
| - echo "Failed to locate torcx binary in ${INSTALL_MNT}" 2>&1 | tee_journal |
307 |
| - exit 1 |
308 |
| -fi |
309 |
| - |
310 |
| -call_torcx() { |
311 |
| - "${TORCX_BIN}" "$@" 2>&1 | tee_journal |
312 |
| -} |
313 |
| - |
314 |
| -# Check if torcx requires any additional addon available on a remote. |
315 |
| -: "${TORCX_CHECK_REMOTE_ONLY:="true"}" |
316 |
| -TORCX_USR_MOUNTPOINT="${INSTALL_MNT}" |
317 |
| -if [[ -e /etc/torcx/next-profile ]] && [[ -n "${TORCX_BIN}" ]] ; then |
318 |
| - export -- TORCX_USR_MOUNTPOINT |
319 |
| - if ! call_torcx profile check --remote-only="${TORCX_CHECK_REMOTE_ONLY}" --os-release="${NEXT_VERSION_ID}" ; then |
320 |
| - echo "Populating local torcx store with remote images. This may take some time." | tee_journal |
321 |
| - call_torcx profile populate --os-release="${NEXT_VERSION_ID}" |
322 |
| - call_torcx profile check --remote-only="${TORCX_CHECK_REMOTE_ONLY}" --os-release="${NEXT_VERSION_ID}" |
323 |
| - call_torcx image clear-versioned -k "${VERSION_ID}" -k "${NEXT_VERSION_ID}" |
324 |
| - fi |
325 |
| -fi |
326 |
| - |
327 | 298 | # Mark the new install with one try and the highest priority
|
328 | 299 | call_cgpt repair "${INSTALL_DEV}"
|
329 | 300 | call_cgpt add -S0 -T1 "${INSTALL_DEV}"
|
|
0 commit comments