File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -737,6 +737,13 @@ pub(crate) async fn stage(
737737 } )
738738 . await ;
739739
740+ // Unconditionally create or update /run/reboot-required to signal a reboot is needed.
741+ // This is monitored by kured (Kubernetes Reboot Daemon).
742+ let run_dir = Dir :: open_ambient_dir ( "/run" , cap_std:: ambient_authority ( ) ) ?;
743+ run_dir
744+ . atomic_write ( "reboot-required" , b"" )
745+ . context ( "Creating /run/reboot-required" ) ?;
746+
740747 Ok ( ( ) )
741748}
742749
Original file line number Diff line number Diff line change @@ -65,6 +65,10 @@ RUN echo test content > /usr/share/blah.txt
6565 let progress = open -- raw $progress_json | from json - o
6666 sanity_check_switch_progress_json $progress
6767
68+ # Check that /run/reboot-required exists and is a zero-byte file
69+ let rr_meta = (ls /run/reboot-required | first )
70+ assert equal $rr_meta.size 0b
71+
6872 # Also test that the mtime changes on modification
6973 let new_root_mtime = ls - Dl /ostree/bootc | get modified
7074 assert ($new_root_mtime > $orig_root_mtime )
You can’t perform that action at this time.
0 commit comments