Skip to content

Commit

Permalink
conditional kernel removal
Browse files Browse the repository at this point in the history
  • Loading branch information
korewaChino committed Sep 24, 2024
1 parent 65a3f97 commit 1fd70ed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion base/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ RUN dnf swap -y --allowerasing fedora-release-common ultramarine-release-identit
RUN dnf swap -y fedora-logos ultramarine-logos

# Delete old kernels (and maybe all kernels except the latest one)
RUN dnf remove -y $(dnf repoquery --installonly --latest-limit=-1 -q)

# check if there are any old kernels then remove them
# if empty then do nothing
RUN if [ -n "$(dnf repoquery --installonly --latest-limit=-1 -q)" ]; then dnf remove -y $(dnf repoquery --installonly --latest-limit=-1 -q); fi
# RUN dnf remove -y $(dnf repoquery --installonly --latest-limit=-1 -q) || true

# reinstall kernel modules and stuff for the new kernel, install new kernel in case the old one was removed
# Also install some extra packages :3
Expand Down

0 comments on commit 1fd70ed

Please sign in to comment.