From 5ea244cac84e7d8d204d40e6706db79bd60d25f4 Mon Sep 17 00:00:00 2001
From: Vivek R <vivekreddykarri98@gmail.com>
Date: Sat, 14 May 2022 05:20:57 -0700
Subject: [PATCH] Removed platform specific reboot files for mellanox simx
 platforms (#10806)

- Why I did it
Platform_reboot files for simx doesn't do aything different apart from calling /sbin/reboot. which is anyway done in the /usr/local/bin/reboot script i.e. the parent script which calls the platform specific reboot scripts if present.

Moreover, /sbin/reboot invoked in the platform specific reboot script is a non-blocking call and thus it returns back to the original script (although /sbin/reboot does it job in the background) and we see messages like this.

Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
---
 .../platform_reboot                           | 21 -------------------
 .../platform_reboot                           |  1 -
 .../platform_reboot                           |  1 -
 .../platform_reboot                           |  1 -
 .../platform_reboot                           |  1 -
 5 files changed, 25 deletions(-)
 delete mode 100755 device/mellanox/x86_64-mlnx_msn2700_simx-r0/platform_reboot
 delete mode 120000 device/mellanox/x86_64-mlnx_msn3700_simx-r0/platform_reboot
 delete mode 120000 device/mellanox/x86_64-mlnx_msn4700_simx-r0/platform_reboot
 delete mode 120000 device/mellanox/x86_64-nvidia_sn4800_simx-r0/platform_reboot
 delete mode 120000 device/mellanox/x86_64-nvidia_sn5600_simx-r0/platform_reboot

diff --git a/device/mellanox/x86_64-mlnx_msn2700_simx-r0/platform_reboot b/device/mellanox/x86_64-mlnx_msn2700_simx-r0/platform_reboot
deleted file mode 100755
index 5b9809e10423..000000000000
--- a/device/mellanox/x86_64-mlnx_msn2700_simx-r0/platform_reboot
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-declare -r EXIT_SUCCESS="0"
-declare -r EXIT_ERROR="1"
-
-FORCE_REBOOT="no"
-
-function ParseArguments() {
-    while [ $# -ge 1 ]; do
-        case "$1" in
-            -f|--force)
-                FORCE_REBOOT="yes"
-            ;;
-        esac
-        shift
-    done
-}
-
-ParseArguments "$@"
-
-exec /sbin/reboot $@
diff --git a/device/mellanox/x86_64-mlnx_msn3700_simx-r0/platform_reboot b/device/mellanox/x86_64-mlnx_msn3700_simx-r0/platform_reboot
deleted file mode 120000
index dfaf53417665..000000000000
--- a/device/mellanox/x86_64-mlnx_msn3700_simx-r0/platform_reboot
+++ /dev/null
@@ -1 +0,0 @@
-../x86_64-mlnx_msn2700_simx-r0/platform_reboot
\ No newline at end of file
diff --git a/device/mellanox/x86_64-mlnx_msn4700_simx-r0/platform_reboot b/device/mellanox/x86_64-mlnx_msn4700_simx-r0/platform_reboot
deleted file mode 120000
index dfaf53417665..000000000000
--- a/device/mellanox/x86_64-mlnx_msn4700_simx-r0/platform_reboot
+++ /dev/null
@@ -1 +0,0 @@
-../x86_64-mlnx_msn2700_simx-r0/platform_reboot
\ No newline at end of file
diff --git a/device/mellanox/x86_64-nvidia_sn4800_simx-r0/platform_reboot b/device/mellanox/x86_64-nvidia_sn4800_simx-r0/platform_reboot
deleted file mode 120000
index dfaf53417665..000000000000
--- a/device/mellanox/x86_64-nvidia_sn4800_simx-r0/platform_reboot
+++ /dev/null
@@ -1 +0,0 @@
-../x86_64-mlnx_msn2700_simx-r0/platform_reboot
\ No newline at end of file
diff --git a/device/mellanox/x86_64-nvidia_sn5600_simx-r0/platform_reboot b/device/mellanox/x86_64-nvidia_sn5600_simx-r0/platform_reboot
deleted file mode 120000
index dfaf53417665..000000000000
--- a/device/mellanox/x86_64-nvidia_sn5600_simx-r0/platform_reboot
+++ /dev/null
@@ -1 +0,0 @@
-../x86_64-mlnx_msn2700_simx-r0/platform_reboot
\ No newline at end of file