]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/update-done/update-done.c
update-done: Create using a temporary file (#5789)
authorcodekipper <codekipper@gmail.com>
Wed, 26 Apr 2017 23:49:06 +0000 (01:49 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 26 Apr 2017 23:49:06 +0000 (19:49 -0400)
commit5a1d67639d8d3c25f817cf2958348c3f3193a573
tree47cc5182393931f57d4b983d7f4d4ae5af29b0e8
parent6385cb31ef443be3e0d6da5ea62a267a49174688
update-done: Create using a temporary file (#5789)

'/etc/.updated' is created without using a temporary file, this can be
problematic with filesystems that cache writes. Modify so that the
timestamp is written to a temporary file and then use an atomic move
to move it to its correct place.
src/update-done/update-done.c