Skip to content

Commit e4b5571

Browse files
authored
Merge pull request #30 from flatcar/t-lo/postinst-handle-torcx-removal
flatcar-postinst: Remove torcx sanity checks
2 parents 1130900 + 0734e00 commit e4b5571

File tree

1 file changed

+1
-30
lines changed

1 file changed

+1
-30
lines changed

flatcar-postinst

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
22
# Copyright (c) 2014 The CoreOS Authors.
3+
# Copyright (c) 2023 The Flatcar Maintainers.
34
# Use of this source code is governed by a BSD-style license that can be
45
# found in the LICENSE file.
56

@@ -294,36 +295,6 @@ if [[ -z "${LDSO}" ]]; then
294295
fi
295296
LIBS="${LDSO%/*}"
296297

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-
327298
# Mark the new install with one try and the highest priority
328299
call_cgpt repair "${INSTALL_DEV}"
329300
call_cgpt add -S0 -T1 "${INSTALL_DEV}"

0 commit comments

Comments
 (0)