From 045c9faab9e408eedb70474281a774e0a14eb82e Mon Sep 17 00:00:00 2001 From: Piyush Kumar Date: Wed, 28 Feb 2024 17:27:33 +0530 Subject: [PATCH] run soft link to grub2-editenv only if file does not exists --- Earthfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Earthfile b/Earthfile index c6075d2..6461caa 100644 --- a/Earthfile +++ b/Earthfile @@ -300,7 +300,9 @@ base-image: RUN kernel=$(ls /lib/modules | tail -n1) && \ depmod -a "${kernel}" - RUN ln -s /usr/sbin/grub-editenv /usr/bin/grub2-editenv + RUN if [ ! -f /usr/bin/grub2-editenv ]; then \ + ln -s /usr/sbin/grub-editenv /usr/bin/grub2-editenv; \ + fi RUN rm -rf /var/cache/* && \ apt clean