summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2014-06-20 15:57:43 +0200
committerKay Sievers <kay@vrfy.org>2014-06-20 15:57:43 +0200
commit2f3b873a49734f8ecc8d929612d33153acbda891 (patch)
tree57b675b313f60394b1c3b95a336346627b5462bf /src
parent351e57652a7d9a51f9064c089794d13801eaee73 (diff)
tmpfiles: copy/link /usr/share/factory/ files when the source argument is omitted
Diffstat (limited to 'src')
-rw-r--r--src/tmpfiles/tmpfiles.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index cbad78aea5..68cfa55ce9 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -1249,10 +1249,10 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
case CREATE_SYMLINK:
if (!i->argument) {
- log_error("[%s:%u] Symlink file requires argument.", fname, line);
- return -EBADMSG;
+ i->argument = strappend("/usr/share/factory", i->path);
+ if (!i->argument)
+ return log_oom();
}
-
break;
case WRITE_FILE:
@@ -1264,8 +1264,9 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
case COPY_FILES:
if (!i->argument) {
- log_error("[%s:%u] Copy files requires argument.", fname, line);
- return -EBADMSG;
+ i->argument = strappend("/usr/share/factory", i->path);
+ if (!i->argument)
+ return log_oom();
}
if (!path_is_absolute(i->argument)) {