[reboiot-cause] Fix a broken symlink of previous-reboot-cause file removal issue (#10751)
Signed-off-by: mlok <marty.lok@nokia.com>
This commit is contained in:
parent
04175eb34a
commit
dee7655526
@ -174,7 +174,7 @@ def main():
|
|||||||
os.makedirs(REBOOT_CAUSE_DIR)
|
os.makedirs(REBOOT_CAUSE_DIR)
|
||||||
|
|
||||||
# Remove stale PREVIOUS_REBOOT_CAUSE_FILE if it exists
|
# 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)
|
os.remove(PREVIOUS_REBOOT_CAUSE_FILE)
|
||||||
|
|
||||||
# This variable is kept for future-use purpose. When proc_cmd_line/vendor/software provides
|
# This variable is kept for future-use purpose. When proc_cmd_line/vendor/software provides
|
||||||
|
Loading…
Reference in New Issue
Block a user