From 9e3f1c791457c5666257c9534d4a9ec608e038df Mon Sep 17 00:00:00 2001 From: lizhuhuams <103542826+lizhuhuams@users.noreply.github.com> Date: Wed, 18 May 2022 10:37:32 -0700 Subject: [PATCH] Revert "[reboiot-cause] Fix a broken symlink of previous-reboot-cause file removal issue (#10751)" (#10849) This reverts commit dee7655526699e3f66bf3744e098f03203345449. Co-authored-by: Ubuntu --- src/sonic-host-services/scripts/determine-reboot-cause | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-host-services/scripts/determine-reboot-cause b/src/sonic-host-services/scripts/determine-reboot-cause index 21b13d86aad8..1408ad0e2952 100755 --- a/src/sonic-host-services/scripts/determine-reboot-cause +++ b/src/sonic-host-services/scripts/determine-reboot-cause @@ -174,7 +174,7 @@ def main(): os.makedirs(REBOOT_CAUSE_DIR) # Remove stale PREVIOUS_REBOOT_CAUSE_FILE if it exists - if os.path.exists(PREVIOUS_REBOOT_CAUSE_FILE) or os.path.islink(PREVIOUS_REBOOT_CAUSE_FILE): + if os.path.exists(PREVIOUS_REBOOT_CAUSE_FILE): os.remove(PREVIOUS_REBOOT_CAUSE_FILE) # This variable is kept for future-use purpose. When proc_cmd_line/vendor/software provides