diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index f6e9d2a17c..b3025ea09b 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -137,10 +137,10 @@ a symlink, so when systemd is asked through D-Bus to load dbus-org.freedesktop.network1.service, it'll load systemd-networkd.service. Alias names may be used in commands like - enable, disable, start, stop, - status, and similar, and in all unit dependency directives, including - Wants=, Requires=, Before=, - After=. Aliases cannot be used with the preset command. + disable, start, stop, status, + and similar, and in all unit dependency directives, including Wants=, + Requires=, Before=, After=. Aliases cannot be + used with the preset command. Unit files may specify aliases through the Alias= directive in the [Install] section. When the unit is enabled, symlinks will be created for those names, and removed when the unit is diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index d98ec32a0b..76d8a03702 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -1903,11 +1903,13 @@ static int install_error( case -ELOOP: r = sd_bus_error_setf(error, BUS_ERROR_UNIT_LINKED, - "Refusing to operate on linked unit file %s", changes[i].path); + "Refusing to operate on alias name or linked unit file: %s", + changes[i].path); goto found; case -ENOENT: - r = sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_UNIT, "Unit file %s does not exist.", changes[i].path); + r = sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_UNIT, + "Unit file %s does not exist.", changes[i].path); goto found; default: diff --git a/src/shared/install.c b/src/shared/install.c index 8f9cf4a2f4..0724dd96ee 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -1897,7 +1897,7 @@ static int install_context_apply( q = install_info_traverse(scope, c, paths, i, flags, NULL); if (q < 0) { - unit_file_changes_add(changes, n_changes, r, i->name, NULL); + unit_file_changes_add(changes, n_changes, q, i->name, NULL); return q; }