Skip to content

Commit

Permalink
[reboot-cause] Porting PR to fix a broken symlink of previous-reboot-…
Browse files Browse the repository at this point in the history
…cause file removal issue (sonic-host-services sonic-net#46)

Signed-off-by: mlok <[email protected]>
  • Loading branch information
mlok-nokia committed Mar 6, 2023
1 parent a1f9ee5 commit 54fb460
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sonic-host-services/scripts/determine-reboot-cause
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,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):
if os.path.exists(PREVIOUS_REBOOT_CAUSE_FILE) or os.path.islink(PREVIOUS_REBOOT_CAUSE_FILE):
os.remove(PREVIOUS_REBOOT_CAUSE_FILE)

previous_reboot_cause, additional_reboot_info = determine_reboot_cause()
Expand Down

0 comments on commit 54fb460

Please sign in to comment.