Skip to content

Commit a95d6d8

Browse files
authored
Merge pull request #29 from flatcar/kai/postinst-mv-clean
flatcar-postinst: Clean up incomplete move target
2 parents f9211bc + 03f754a commit a95d6d8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

flatcar-postinst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ if [ "${OEMID}" != "" ] && { [ -e "${INSTALL_MNT}/share/flatcar/oems/${OEMID}" ]
158158
# We don't need to check if it's the initial MVP OEM because it's an update payload provided for a particular version
159159
echo "Trying to place /var/lib/update_engine/oem-${OEMID}-${NEXT_VERSION}.raw on OEM partition" >&2
160160
if ! mv "/var/lib/update_engine/oem-${OEMID}.raw" "${NEW_SYSEXT}"; then
161+
rm -f "${NEW_SYSEXT}"
161162
echo "That failed, moving it to right location on root partition" >&2
162163
NEW_SYSEXT="/etc/flatcar/oem-sysext/oem-${OEMID}-${NEXT_VERSION}.raw"
163164
mv "/var/lib/update_engine/oem-${OEMID}.raw" "${NEW_SYSEXT}"

0 commit comments

Comments
 (0)