Fix issue with fat filesystems. The mv left the filesystem in a different (#2697)

state than a cp will.  On an ext4 filesystem the ln leaves both objects, but
the fat version was only leaving the Image.  This was causing an error
latter in the postinst script when the vmlinuz- filename was referenced
This commit is contained in:
SteeManMI 2021-03-08 13:14:45 -05:00 committed by GitHub
parent 0e8a4464c8
commit cd5e102c47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -196,7 +196,7 @@ index 1b11f8993..c21d931ea 100755
+##
+sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/postinst
+cat >> $tmpdir/DEBIAN/postinst <<EOT
+ln -sf $(basename $installed_image_path) /boot/$image_name 2> /dev/null || mv /$installed_image_path /boot/$image_name
+ln -sf $(basename $installed_image_path) /boot/$image_name 2> /dev/null || cp /$installed_image_path /boot/$image_name
+touch /boot/.next
+exit 0
+EOT