diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-10-08 03:09:25 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-10-08 03:09:25 +0200 |
commit | b9c0d4415b8cd6135321185b6febfdd1366a477c (patch) | |
tree | c322309e262ea7c49c0ebe06ad0a52d8268c2dad /src/systemctl.c | |
parent | f34277d9117cd9d858f7332eef0023e05277ce74 (diff) |
systemctl: fix 'systemctl enable getty@.service'
Diffstat (limited to 'src/systemctl.c')
-rw-r--r-- | src/systemctl.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/systemctl.c b/src/systemctl.c index 4beec0fca5..c8384ff530 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -3247,7 +3247,7 @@ static int install_info_add(const char *name) { assert(will_install); - if (!unit_name_is_valid_no_type(name)) { + if (!unit_name_is_valid_no_type(name, true)) { log_warning("Unit name %s is not a valid unit name.", name); return -EINVAL; } @@ -3633,12 +3633,6 @@ static int install_info_symlink_alias(const char *verb, InstallInfo *i, const ch STRV_FOREACH(s, i->aliases) { - if (!unit_name_is_valid_no_type(*s)) { - log_error("Invalid name %s.", *s); - r = -EINVAL; - goto finish; - } - free(alias_path); if (!(alias_path = path_make_absolute(*s, config_path))) { log_error("Out of memory"); @@ -3670,7 +3664,7 @@ static int install_info_symlink_wants(const char *verb, InstallInfo *i, const ch assert(config_path); STRV_FOREACH(s, i->wanted_by) { - if (!unit_name_is_valid_no_type(*s)) { + if (!unit_name_is_valid_no_type(*s, true)) { log_error("Invalid name %s.", *s); r = -EINVAL; goto finish; |