chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1713703
)
install: "systemctl enable" should be a nop for template units lacking a DefaultInsta...
author
Lennart Poettering
<lennart@poettering.net>
Mon, 16 Jun 2014 23:22:55 +0000
(
01:22
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 17 Jun 2014 00:43:44 +0000
(
02:43
+0200)
src/shared/install.c
patch
|
blob
|
history
diff --git
a/src/shared/install.c
b/src/shared/install.c
index 26dbbb6f07c155cbe7b5d092e9e85b2eb31df971..39f5dd2d2d999b72b99697c90a9710b1082f7db9 100644
(file)
--- a/
src/shared/install.c
+++ b/
src/shared/install.c
@@
-1302,7
+1302,14
@@
static int install_info_symlink_wants(
assert(i);
assert(config_path);
- if (unit_name_is_template(i->name) && i->default_instance) {
+ if (unit_name_is_template(i->name)) {
+
+ /* Don't install any symlink if there's no default
+ * instance configured */
+
+ if (!i->default_instance)
+ return 0;
+
buf = unit_name_replace_instance(i->name, i->default_instance);
if (!buf)
return -ENOMEM;