From 2e969356db338cb35a84e991b9fa05e9d6425c67 Mon Sep 17 00:00:00 2001 From: Ajayswar S Date: Mon, 11 Sep 2023 16:58:57 +0530 Subject: [PATCH] Regarding sh err & mount /sys error rectification -Mount is checked before mounting sysfs on /sys -The command exec sh is changed to exec sh +m Signed-off-by: Ajayswar S --- common/ramdisk/init.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/common/ramdisk/init.sh b/common/ramdisk/init.sh index 65e671d..abed8d4 100644 --- a/common/ramdisk/init.sh +++ b/common/ramdisk/init.sh @@ -30,7 +30,15 @@ #Mount things needed by this script /bin/busybox mount -t proc proc /proc -/bin/busybox mount -t sysfs sysfs /sys + + +if ! mountpoint -q /sys; then + echo "Mounting /sysfs..." + /bin/busybox mount -t sysfs sysfs /sys +else + echo "/sysfs is already mounted." +fi + mount -t efivarfs efivarfs /sys/firmware/efi/efivars echo "init.sh" @@ -77,7 +85,7 @@ if [ $ADDITIONAL_CMD_OPTION != "noacs" ]; then echo "Please press to continue ..." sync /mnt sleep 3 - exec sh + exec sh +m fi #linux debug dump mkdir -p /mnt/acs_results/linux_dump @@ -157,4 +165,4 @@ fi sync /mnt sleep 3 -exec sh +exec sh +m