Skip to content

Commit

Permalink
Merge pull request #29 from flatcar/kai/postinst-mv-clean
Browse files Browse the repository at this point in the history
flatcar-postinst: Clean up incomplete move target
  • Loading branch information
krnowak authored Oct 16, 2023
2 parents f9211bc + 03f754a commit a95d6d8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions flatcar-postinst
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ if [ "${OEMID}" != "" ] && { [ -e "${INSTALL_MNT}/share/flatcar/oems/${OEMID}" ]
# We don't need to check if it's the initial MVP OEM because it's an update payload provided for a particular version
echo "Trying to place /var/lib/update_engine/oem-${OEMID}-${NEXT_VERSION}.raw on OEM partition" >&2
if ! mv "/var/lib/update_engine/oem-${OEMID}.raw" "${NEW_SYSEXT}"; then
rm -f "${NEW_SYSEXT}"
echo "That failed, moving it to right location on root partition" >&2
NEW_SYSEXT="/etc/flatcar/oem-sysext/oem-${OEMID}-${NEXT_VERSION}.raw"
mv "/var/lib/update_engine/oem-${OEMID}.raw" "${NEW_SYSEXT}"
Expand Down

0 comments on commit a95d6d8

Please sign in to comment.