summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemctl/systemctl.c')
-rw-r--r--src/systemctl/systemctl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 6394b4749e..4103a5da6d 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -5473,6 +5473,8 @@ static int enable_unit(int argc, char *argv[], void *userdata) {
if (r == -ESHUTDOWN)
return log_error_errno(r, "Unit file is masked.");
+ if (r == -EADDRNOTAVAIL)
+ return log_error_errno(r, "Unit file is generated.");
if (r < 0)
return log_error_errno(r, "Operation failed: %m");
@@ -5639,6 +5641,8 @@ static int add_dependency(int argc, char *argv[], void *userdata) {
r = unit_file_add_dependency(arg_scope, arg_runtime, arg_root, names, target, dep, arg_force, &changes, &n_changes);
if (r == -ESHUTDOWN)
return log_error_errno(r, "Unit file is masked.");
+ if (r == -EADDRNOTAVAIL)
+ return log_error_errno(r, "Unit file is generated.");
if (r < 0)
return log_error_errno(r, "Can't add dependency: %m");