logind: write rules files atomically

This commit is contained in:
Lennart Poettering
2011-07-05 03:29:24 +02:00
parent 0a31730e3b
commit b5ef5549e9
2 changed files with 3 additions and 8 deletions
+1 -1
View File
@@ -634,7 +634,7 @@ static int attach_device(Manager *m, const char *seat, const char *sysfs) {
}
mkdir_p("/etc/udev/rules.d", 0755);
r = write_one_line_file(file, rule);
r = write_one_line_file_atomic(file, rule);
if (r < 0)
goto finish;