diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-12-19 16:55:11 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-12-21 12:39:06 +0100 |
commit | b59817b199f3613c63cef36db63986b621dfc92a (patch) | |
tree | d841ef2c522e3c0f60c4b55d0a7469de45a84428 /src | |
parent | basic/unit-name: make sure UnitNameFlags is signed (diff) | |
download | systemd-b59817b199f3613c63cef36db63986b621dfc92a.tar.xz systemd-b59817b199f3613c63cef36db63986b621dfc92a.zip |
shared/install: drop creation of alias for DefaultInstance
It turns out that this is not necessary. When we try to resolve alias@inst, we
first check alias@inst, and if that is not found, fall back to alias@. Since we
already created a symlink for alias@, we will find that and the result will be
the same.
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/install.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/shared/install.c b/src/shared/install.c index 236f9a6e59..df9f92bddc 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -1788,22 +1788,6 @@ static int install_info_symlink_alias( q = create_symlink(paths, i->path, alias_path, force, changes, n_changes); if (r == 0) r = q; - - /* if we are a template with a DefaultInstance and we target a template, also create a link from the DefaultInstance*/ - if (unit_name_is_valid(i->name, UNIT_NAME_TEMPLATE) && unit_name_is_valid(dst, UNIT_NAME_TEMPLATE) && i->default_instance) { - _cleanup_free_ char *s_copy = NULL,*final_path = NULL; - - q = unit_name_replace_instance(dst,i->default_instance,&s_copy); - if (q < 0) - return q; - final_path = path_make_absolute(s_copy, config_path); - if (!final_path) - return -ENOMEM; - q = create_symlink(paths, i->path, final_path, force, changes, n_changes); - if (r == 0) - r = q; - } - } return r; |