summaryrefslogtreecommitdiff
path: root/src/hostnamed.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-06-15 15:35:23 +0200
committerLennart Poettering <lennart@poettering.net>2011-06-21 19:29:45 +0200
commit34ca941cec76bbfdfd02c705b76bc1b53ea2bcd1 (patch)
treeb81128a17066a21c8da2bd767c581e9fea5cf1f1 /src/hostnamed.c
parent5f4b19f4bc4b6e747ca19f53ef33a167ecf9ac0b (diff)
util: make a couple of files we write atomic
Diffstat (limited to 'src/hostnamed.c')
-rw-r--r--src/hostnamed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hostnamed.c b/src/hostnamed.c
index cf2172fd2c..68c5715b0e 100644
--- a/src/hostnamed.c
+++ b/src/hostnamed.c
@@ -201,7 +201,7 @@ static int write_data_static_hostname(void) {
return 0;
}
- return write_one_line_file("/etc/hostname", data[PROP_STATIC_HOSTNAME]);
+ return write_one_line_file_atomic("/etc/hostname", data[PROP_STATIC_HOSTNAME]);
}
static int write_data_other(void) {