Skip to content

Commit

Permalink
[reboiot-cause] Fix a broken symlink of previous-reboot-cause file re…
Browse files Browse the repository at this point in the history
…moval issue (sonic-net#10751)

Signed-off-by: mlok <marty.lok@nokia.com>
  • Loading branch information
mlok-nokia authored May 11, 2022
1 parent 04175eb commit dee7655
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 @@ -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):
if os.path.exists(PREVIOUS_REBOOT_CAUSE_FILE) or os.path.islink(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
Expand Down

0 comments on commit dee7655

Please sign in to comment.